From 70a325049b7dd9b4e72e328f50f55a0dad35b880 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 10 Jul 2018 11:26:53 -0700 Subject: [PATCH 01/10] Generated from e1fc2e1bdad54c396693d98c655354fc82f8f36b (#2885) 1) Fix for linter error "Properties of a PATCH request body must not be default-valued. PATCH operation: 'EventSubscriptions_Update' Model Definition: 'EventSubscriptionUpdateParameters' Property: 'eventDeliverySchema'". 2) Updated the default value of EventDeliverySchema to the correct value used by the service. --- .../models/event_hub_event_subscription_destination_py3.py | 2 +- .../azure/mgmt/eventgrid/models/event_subscription.py | 4 ++-- .../azure/mgmt/eventgrid/models/event_subscription_py3.py | 6 +++--- .../models/event_subscription_update_parameters.py | 5 ++--- .../models/event_subscription_update_parameters_py3.py | 5 ++--- .../azure/mgmt/eventgrid/models/event_type_py3.py | 2 +- .../hybrid_connection_event_subscription_destination_py3.py | 2 +- .../mgmt/eventgrid/models/json_input_schema_mapping_py3.py | 2 +- .../models/storage_blob_dead_letter_destination_py3.py | 2 +- .../storage_queue_event_subscription_destination_py3.py | 2 +- .../azure/mgmt/eventgrid/models/topic_py3.py | 2 +- .../azure/mgmt/eventgrid/models/topic_type_info_py3.py | 2 +- .../azure/mgmt/eventgrid/models/tracked_resource_py3.py | 2 +- .../models/web_hook_event_subscription_destination_py3.py | 2 +- azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py | 2 +- 15 files changed, 20 insertions(+), 22 deletions(-) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_hub_event_subscription_destination_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_hub_event_subscription_destination_py3.py index 5d6d29000b39..3e86991a1375 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_hub_event_subscription_destination_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_hub_event_subscription_destination_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .event_subscription_destination import EventSubscriptionDestination +from .event_subscription_destination_py3 import EventSubscriptionDestination class EventHubEventSubscriptionDestination(EventSubscriptionDestination): 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 747419ac4275..6e7fb83355d4 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py @@ -42,7 +42,7 @@ class EventSubscription(Resource): :param event_delivery_schema: The event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "EventGridSchema" . + "InputEventSchema" . :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -83,6 +83,6 @@ def __init__(self, **kwargs): self.destination = kwargs.get('destination', None) self.filter = kwargs.get('filter', None) self.labels = kwargs.get('labels', None) - self.event_delivery_schema = kwargs.get('event_delivery_schema', "EventGridSchema") + self.event_delivery_schema = kwargs.get('event_delivery_schema', "InputEventSchema") 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_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_py3.py index 2343a939d830..59cb87e4c9f5 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 @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class EventSubscription(Resource): @@ -42,7 +42,7 @@ class EventSubscription(Resource): :param event_delivery_schema: The event delivery schema for the event subscription. Possible values include: 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "EventGridSchema" . + "InputEventSchema" . :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -76,7 +76,7 @@ class EventSubscription(Resource): 'dead_letter_destination': {'key': 'properties.deadLetterDestination', 'type': 'DeadLetterDestination'}, } - def __init__(self, *, destination=None, filter=None, labels=None, event_delivery_schema="EventGridSchema", retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + def __init__(self, *, destination=None, filter=None, labels=None, event_delivery_schema="InputEventSchema", retry_policy=None, dead_letter_destination=None, **kwargs) -> None: super(EventSubscription, self).__init__(**kwargs) self.topic = None self.provisioning_state = None 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 c077f27fc04e..07b295319084 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 @@ -25,8 +25,7 @@ class EventSubscriptionUpdateParameters(Model): :type labels: list[str] :param event_delivery_schema: The event delivery schema for the event subscription. Possible values include: 'EventGridSchema', - 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "EventGridSchema" . + 'InputEventSchema', 'CloudEventV01Schema' :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -52,6 +51,6 @@ def __init__(self, **kwargs): self.destination = kwargs.get('destination', None) self.filter = kwargs.get('filter', None) self.labels = kwargs.get('labels', None) - self.event_delivery_schema = kwargs.get('event_delivery_schema', "EventGridSchema") + 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 18bb5ec06d64..f88ad534e83f 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 @@ -25,8 +25,7 @@ class EventSubscriptionUpdateParameters(Model): :type labels: list[str] :param event_delivery_schema: The event delivery schema for the event subscription. Possible values include: 'EventGridSchema', - 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "EventGridSchema" . + 'InputEventSchema', 'CloudEventV01Schema' :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -47,7 +46,7 @@ class EventSubscriptionUpdateParameters(Model): 'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'}, } - def __init__(self, *, destination=None, filter=None, labels=None, event_delivery_schema="EventGridSchema", retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + def __init__(self, *, destination=None, filter=None, labels=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 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 1ecafe196244..b2fb69868f3f 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 @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class EventType(Resource): diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/hybrid_connection_event_subscription_destination_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/hybrid_connection_event_subscription_destination_py3.py index 54d0fe6e5202..cbc2c2800399 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/hybrid_connection_event_subscription_destination_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/hybrid_connection_event_subscription_destination_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .event_subscription_destination import EventSubscriptionDestination +from .event_subscription_destination_py3 import EventSubscriptionDestination class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination): 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 index 64c492a5c4f2..4d3ff8a1b8f4 100644 --- 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 @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .input_schema_mapping import InputSchemaMapping +from .input_schema_mapping_py3 import InputSchemaMapping class JsonInputSchemaMapping(InputSchemaMapping): 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 44c3330323ce..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 @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .dead_letter_destination import DeadLetterDestination +from .dead_letter_destination_py3 import DeadLetterDestination class StorageBlobDeadLetterDestination(DeadLetterDestination): diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_queue_event_subscription_destination_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_queue_event_subscription_destination_py3.py index 3b331c76ac26..0804b774727a 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_queue_event_subscription_destination_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_queue_event_subscription_destination_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .event_subscription_destination import EventSubscriptionDestination +from .event_subscription_destination_py3 import EventSubscriptionDestination class StorageQueueEventSubscriptionDestination(EventSubscriptionDestination): 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 59235fefaed1..9c562e93663a 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Topic(TrackedResource): diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_type_info_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_type_info_py3.py index 2061b765cba3..c5bae7879489 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_type_info_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_type_info_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class TopicTypeInfo(Resource): diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/tracked_resource_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/tracked_resource_py3.py index a1f410b1b1ae..dd17171e3b84 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/tracked_resource_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/tracked_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class TrackedResource(Resource): diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/web_hook_event_subscription_destination_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/web_hook_event_subscription_destination_py3.py index 924e23deb39a..2aa7e58c0cf3 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/web_hook_event_subscription_destination_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/web_hook_event_subscription_destination_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .event_subscription_destination import EventSubscriptionDestination +from .event_subscription_destination_py3 import EventSubscriptionDestination class WebHookEventSubscriptionDestination(EventSubscriptionDestination): diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py index 8d86cf0470d7..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.0rc1" +VERSION = "1.0.0" From 83301efd6ea526ff7a8830ca6a37ad6d096d655a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 6 Sep 2018 14:35:25 -0700 Subject: [PATCH 02/10] Generated from b4273ec0b368f83e73154dec7bfcffc5b9135f5f (#3229) Swagger changes for 2018-09-15-preview API version. --- .../event_subscriptions_operations.py | 92 +++++++++---------- .../mgmt/eventgrid/operations/operations.py | 7 +- .../operations/topic_types_operations.py | 20 ++-- .../eventgrid/operations/topics_operations.py | 56 ++++++----- 4 files changed, 79 insertions(+), 96 deletions(-) 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 4c0f4207c460..413ca68989b7 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 @@ -82,7 +82,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -91,8 +91,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -128,6 +128,7 @@ def _create_or_update_initial( # 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()) @@ -140,9 +141,8 @@ def _create_or_update_initial( body_content = self._serialize.body(event_subscription_info, 'EventSubscription') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -244,7 +244,6 @@ def _delete_initial( # Construct headers header_parameters = {} - 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: @@ -253,8 +252,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -334,6 +333,7 @@ def _update_initial( # 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()) @@ -346,9 +346,8 @@ def _update_initial( body_content = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -473,7 +472,7 @@ def get_full_url( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -482,8 +481,8 @@ def get_full_url( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -540,7 +539,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -549,9 +548,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -611,7 +609,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -620,9 +618,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -684,7 +681,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -693,9 +690,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -760,7 +756,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -769,9 +765,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -831,7 +826,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -840,9 +835,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -907,7 +901,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -916,9 +910,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -982,7 +975,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -991,9 +984,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -1061,7 +1053,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -1070,9 +1062,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -1142,7 +1133,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -1151,9 +1142,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py index 364a1340c93d..dc9600e337bb 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py @@ -70,7 +70,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -79,9 +79,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) 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 da5486135b71..ab63c82604f6 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 @@ -69,7 +69,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -78,9 +78,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -131,7 +130,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -140,8 +139,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -198,7 +197,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -207,9 +206,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) 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 c0edd40647bb..9b739c76d128 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py @@ -75,7 +75,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -84,8 +84,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -122,6 +122,7 @@ def _create_or_update_initial( # 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()) @@ -134,9 +135,8 @@ def _create_or_update_initial( body_content = self._serialize.body(topic_info, 'Topic') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -225,7 +225,6 @@ def _delete_initial( # Construct headers header_parameters = {} - 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: @@ -234,8 +233,8 @@ def _delete_initial( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -310,6 +309,7 @@ def _update_initial( # 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()) @@ -322,9 +322,8 @@ def _update_initial( body_content = self._serialize.body(topic_update_parameters, 'TopicUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -431,7 +430,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -440,9 +439,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -502,7 +500,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -511,9 +509,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -569,7 +566,7 @@ def list_shared_access_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -578,8 +575,8 @@ def list_shared_access_keys( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -638,6 +635,7 @@ def regenerate_key( # 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()) @@ -650,9 +648,8 @@ def regenerate_key( body_content = self._serialize.body(regenerate_key_request, 'TopicRegenerateKeyRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -720,7 +717,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -729,9 +726,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) From 00f74c17618a53eaa94d94c444dedc99d05a5df8 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Thu, 6 Sep 2018 22:29:16 +0000 Subject: [PATCH 03/10] Packaging update of azure-mgmt-eventgrid --- azure-mgmt-eventgrid/README.rst | 8 ++++---- azure-mgmt-eventgrid/sdk_packaging.toml | 6 ++++++ azure-mgmt-eventgrid/setup.py | 6 ++++-- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 azure-mgmt-eventgrid/sdk_packaging.toml diff --git a/azure-mgmt-eventgrid/README.rst b/azure-mgmt-eventgrid/README.rst index 1ec01a03bffe..45de4e6b43dd 100644 --- a/azure-mgmt-eventgrid/README.rst +++ b/azure-mgmt-eventgrid/README.rst @@ -1,12 +1,12 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure EventGrid Management Client Library. +This is the Microsoft Azure MyService Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,8 +36,8 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `EventGrid Management -`__ +For code examples, see `MyService Management +`__ on docs.microsoft.com. diff --git a/azure-mgmt-eventgrid/sdk_packaging.toml b/azure-mgmt-eventgrid/sdk_packaging.toml new file mode 100644 index 000000000000..c2ea19617017 --- /dev/null +++ b/azure-mgmt-eventgrid/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-eventgrid" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-eventgrid/setup.py b/azure-mgmt-eventgrid/setup.py index 8323ed33996b..28926d1c46e4 100644 --- a/azure-mgmt-eventgrid/setup.py +++ b/azure-mgmt-eventgrid/setup.py @@ -19,7 +19,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-eventgrid" -PACKAGE_PPRINT_NAME = "EventGrid Management" +PACKAGE_PPRINT_NAME = "MyService Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -72,12 +72,14 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.27,<2.0.0', + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass From 83725e13fb0fb2d9248ce924531c18599e99eb07 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 11 Sep 2018 14:16:34 -0700 Subject: [PATCH 04/10] [AutoPR eventgrid/resource-manager] EventGrid: Updated README.MD configuration to include the new preview API version. (#3292) * Generated from 569674609f3c16360c668e5b0693bdd4385700ec Merge remote-tracking branch 'upstream/master' * Generated from f05cde9aaf9ffa3a4a72406033a5d6527cd94fab Added two new operatorTypes to AdvancedFilter + marked a couple of properties readOnly. --- .../eventgrid/event_grid_management_client.py | 12 +- .../azure/mgmt/eventgrid/models/__init__.py | 70 +- .../mgmt/eventgrid/models/advanced_filter.py | 53 ++ .../eventgrid/models/advanced_filter_py3.py | 53 ++ .../models/bool_equals_advanced_filter.py | 42 ++ .../models/bool_equals_advanced_filter_py3.py | 42 ++ .../azure/mgmt/eventgrid/models/domain.py | 76 ++ .../mgmt/eventgrid/models/domain_paged.py | 27 + .../azure/mgmt/eventgrid/models/domain_py3.py | 76 ++ .../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 | 42 ++ .../eventgrid/models/domain_topic_paged.py | 27 + .../mgmt/eventgrid/models/domain_topic_py3.py | 42 ++ .../models/domain_update_parameters.py | 28 + .../models/domain_update_parameters_py3.py | 28 + .../event_grid_management_client_enums.py | 24 +- .../eventgrid/models/event_subscription.py | 9 +- .../models/event_subscription_filter.py | 4 + .../models/event_subscription_filter_py3.py | 6 +- .../models/event_subscription_py3.py | 9 +- .../event_subscription_update_parameters.py | 7 +- ...vent_subscription_update_parameters_py3.py | 9 +- .../number_greater_than_advanced_filter.py | 42 ++ ...number_greater_than_advanced_filter_py3.py | 42 ++ ..._greater_than_or_equals_advanced_filter.py | 42 ++ ...ater_than_or_equals_advanced_filter_py3.py | 42 ++ .../models/number_in_advanced_filter.py | 42 ++ .../models/number_in_advanced_filter_py3.py | 42 ++ .../number_less_than_advanced_filter.py | 42 ++ .../number_less_than_advanced_filter_py3.py | 42 ++ ...ber_less_than_or_equals_advanced_filter.py | 42 ++ ...less_than_or_equals_advanced_filter_py3.py | 42 ++ .../models/number_not_in_advanced_filter.py | 42 ++ .../number_not_in_advanced_filter_py3.py | 42 ++ .../string_begins_with_advanced_filter.py | 42 ++ .../string_begins_with_advanced_filter_py3.py | 42 ++ .../models/string_contains_advanced_filter.py | 42 ++ .../string_contains_advanced_filter_py3.py | 42 ++ .../string_ends_with_advanced_filter.py | 42 ++ .../string_ends_with_advanced_filter_py3.py | 42 ++ .../models/string_in_advanced_filter.py | 42 ++ .../models/string_in_advanced_filter_py3.py | 42 ++ .../models/string_not_in_advanced_filter.py | 42 ++ .../string_not_in_advanced_filter_py3.py | 42 ++ .../mgmt/eventgrid/operations/__init__.py | 4 + .../operations/domain_topics_operations.py | 179 +++++ .../operations/domains_operations.py | 669 ++++++++++++++++++ .../event_subscriptions_operations.py | 81 ++- .../mgmt/eventgrid/operations/operations.py | 4 +- .../operations/topic_types_operations.py | 4 +- .../eventgrid/operations/topics_operations.py | 4 +- 54 files changed, 2656 insertions(+), 31 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/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/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 b5a272315294..b0378dea2479 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 = '2018-05-01-preview' + self.api_version = '2018-09-15-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 633b89b64252..9a4da95511c0 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py @@ -10,12 +10,31 @@ # -------------------------------------------------------------------------- try: + from .input_schema_mapping_py3 import InputSchemaMapping + from .domain_py3 import Domain + from .domain_update_parameters_py3 import DomainUpdateParameters + from .domain_shared_access_keys_py3 import DomainSharedAccessKeys + from .domain_regenerate_key_request_py3 import DomainRegenerateKeyRequest + from .domain_topic_py3 import DomainTopic from .event_subscription_destination_py3 import EventSubscriptionDestination + from .advanced_filter_py3 import AdvancedFilter from .event_subscription_filter_py3 import EventSubscriptionFilter from .retry_policy_py3 import RetryPolicy from .dead_letter_destination_py3 import DeadLetterDestination from .resource_py3 import Resource + from .number_in_advanced_filter_py3 import NumberInAdvancedFilter from .storage_blob_dead_letter_destination_py3 import StorageBlobDeadLetterDestination + from .number_not_in_advanced_filter_py3 import NumberNotInAdvancedFilter + from .number_less_than_advanced_filter_py3 import NumberLessThanAdvancedFilter + from .number_greater_than_advanced_filter_py3 import NumberGreaterThanAdvancedFilter + from .number_less_than_or_equals_advanced_filter_py3 import NumberLessThanOrEqualsAdvancedFilter + from .number_greater_than_or_equals_advanced_filter_py3 import NumberGreaterThanOrEqualsAdvancedFilter + from .bool_equals_advanced_filter_py3 import BoolEqualsAdvancedFilter + from .string_in_advanced_filter_py3 import StringInAdvancedFilter + from .string_not_in_advanced_filter_py3 import StringNotInAdvancedFilter + from .string_begins_with_advanced_filter_py3 import StringBeginsWithAdvancedFilter + from .string_ends_with_advanced_filter_py3 import StringEndsWithAdvancedFilter + from .string_contains_advanced_filter_py3 import StringContainsAdvancedFilter from .web_hook_event_subscription_destination_py3 import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination_py3 import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination_py3 import StorageQueueEventSubscriptionDestination @@ -25,7 +44,6 @@ from .event_subscription_full_url_py3 import EventSubscriptionFullUrl from .operation_info_py3 import OperationInfo from .operation_py3 import Operation - from .input_schema_mapping_py3 import InputSchemaMapping from .json_field_py3 import JsonField from .json_field_with_default_py3 import JsonFieldWithDefault from .json_input_schema_mapping_py3 import JsonInputSchemaMapping @@ -37,12 +55,31 @@ from .event_type_py3 import EventType from .topic_type_info_py3 import TopicTypeInfo except (SyntaxError, ImportError): + from .input_schema_mapping import InputSchemaMapping + from .domain import Domain + from .domain_update_parameters import DomainUpdateParameters + from .domain_shared_access_keys import DomainSharedAccessKeys + from .domain_regenerate_key_request import DomainRegenerateKeyRequest + from .domain_topic import DomainTopic from .event_subscription_destination import EventSubscriptionDestination + from .advanced_filter import AdvancedFilter from .event_subscription_filter import EventSubscriptionFilter from .retry_policy import RetryPolicy from .dead_letter_destination import DeadLetterDestination from .resource import Resource + from .number_in_advanced_filter import NumberInAdvancedFilter from .storage_blob_dead_letter_destination import StorageBlobDeadLetterDestination + from .number_not_in_advanced_filter import NumberNotInAdvancedFilter + from .number_less_than_advanced_filter import NumberLessThanAdvancedFilter + from .number_greater_than_advanced_filter import NumberGreaterThanAdvancedFilter + from .number_less_than_or_equals_advanced_filter import NumberLessThanOrEqualsAdvancedFilter + from .number_greater_than_or_equals_advanced_filter import NumberGreaterThanOrEqualsAdvancedFilter + from .bool_equals_advanced_filter import BoolEqualsAdvancedFilter + from .string_in_advanced_filter import StringInAdvancedFilter + from .string_not_in_advanced_filter import StringNotInAdvancedFilter + from .string_begins_with_advanced_filter import StringBeginsWithAdvancedFilter + from .string_ends_with_advanced_filter import StringEndsWithAdvancedFilter + from .string_contains_advanced_filter import StringContainsAdvancedFilter from .web_hook_event_subscription_destination import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination import StorageQueueEventSubscriptionDestination @@ -52,7 +89,6 @@ from .event_subscription_full_url import EventSubscriptionFullUrl from .operation_info import OperationInfo from .operation import Operation - from .input_schema_mapping import InputSchemaMapping from .json_field import JsonField from .json_field_with_default import JsonFieldWithDefault from .json_input_schema_mapping import JsonInputSchemaMapping @@ -63,27 +99,49 @@ from .topic_regenerate_key_request import TopicRegenerateKeyRequest from .event_type import EventType from .topic_type_info import TopicTypeInfo +from .domain_paged import DomainPaged +from .domain_topic_paged import DomainTopicPaged from .event_subscription_paged import EventSubscriptionPaged from .operation_paged import OperationPaged from .topic_paged import TopicPaged from .event_type_paged import EventTypePaged from .topic_type_info_paged import TopicTypeInfoPaged from .event_grid_management_client_enums import ( + DomainProvisioningState, + InputSchema, EventSubscriptionProvisioningState, EventDeliverySchema, TopicProvisioningState, - InputSchema, ResourceRegionType, TopicTypeProvisioningState, ) __all__ = [ + 'InputSchemaMapping', + 'Domain', + 'DomainUpdateParameters', + 'DomainSharedAccessKeys', + 'DomainRegenerateKeyRequest', + 'DomainTopic', 'EventSubscriptionDestination', + 'AdvancedFilter', 'EventSubscriptionFilter', 'RetryPolicy', 'DeadLetterDestination', 'Resource', + 'NumberInAdvancedFilter', 'StorageBlobDeadLetterDestination', + 'NumberNotInAdvancedFilter', + 'NumberLessThanAdvancedFilter', + 'NumberGreaterThanAdvancedFilter', + 'NumberLessThanOrEqualsAdvancedFilter', + 'NumberGreaterThanOrEqualsAdvancedFilter', + 'BoolEqualsAdvancedFilter', + 'StringInAdvancedFilter', + 'StringNotInAdvancedFilter', + 'StringBeginsWithAdvancedFilter', + 'StringEndsWithAdvancedFilter', + 'StringContainsAdvancedFilter', 'WebHookEventSubscriptionDestination', 'EventHubEventSubscriptionDestination', 'StorageQueueEventSubscriptionDestination', @@ -93,7 +151,6 @@ 'EventSubscriptionFullUrl', 'OperationInfo', 'Operation', - 'InputSchemaMapping', 'JsonField', 'JsonFieldWithDefault', 'JsonInputSchemaMapping', @@ -104,15 +161,18 @@ 'TopicRegenerateKeyRequest', 'EventType', 'TopicTypeInfo', + 'DomainPaged', + 'DomainTopicPaged', 'EventSubscriptionPaged', 'OperationPaged', 'TopicPaged', 'EventTypePaged', 'TopicTypeInfoPaged', + 'DomainProvisioningState', + 'InputSchema', 'EventSubscriptionProvisioningState', 'EventDeliverySchema', 'TopicProvisioningState', - 'InputSchema', '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..0b166b4a1015 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdvancedFilter(Model): + """Represents an advanced filter that can be used to filter events based on + various event envelope/data fields. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, + NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, + NumberLessThanOrEqualsAdvancedFilter, + NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, + StringInAdvancedFilter, StringNotInAdvancedFilter, + StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, + StringContainsAdvancedFilter + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + } + + _subtype_map = { + 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} + } + + def __init__(self, **kwargs): + super(AdvancedFilter, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py new file mode 100644 index 000000000000..1330bddfa4fa --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdvancedFilter(Model): + """Represents an advanced filter that can be used to filter events based on + various event envelope/data fields. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, + NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, + NumberLessThanOrEqualsAdvancedFilter, + NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, + StringInAdvancedFilter, StringNotInAdvancedFilter, + StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, + StringContainsAdvancedFilter + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + } + + _subtype_map = { + 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} + } + + def __init__(self, *, key: str=None, **kwargs) -> None: + super(AdvancedFilter, self).__init__(**kwargs) + self.key = key + self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py new file mode 100644 index 000000000000..ac55b0091505 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class BoolEqualsAdvancedFilter(AdvancedFilter): + """BoolEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: bool + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(BoolEqualsAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py new file mode 100644 index 000000000000..c648cc1db73f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class BoolEqualsAdvancedFilter(AdvancedFilter): + """BoolEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: bool + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, *, key: str=None, value: bool=None, **kwargs) -> None: + super(BoolEqualsAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py new file mode 100644 index 000000000000..868394ac75f0 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class Domain(TrackedResource): + """EventGrid Domain. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + :param location: Required. Location of the resource + :type location: str + :param tags: Tags of the resource + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the domain. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Canceled', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.eventgrid.models.DomainProvisioningState + :ivar endpoint: Endpoint for the domain. + :vartype endpoint: str + :param input_schema: This determines the format that Event Grid should + expect for incoming events published to the domain. Possible values + include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' + :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema + :param input_schema_mapping: Information about the InputSchemaMapping + which specified the info about mapping event payload. + :type input_schema_mapping: + ~azure.mgmt.eventgrid.models.InputSchemaMapping + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, + 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, + } + + def __init__(self, **kwargs): + super(Domain, self).__init__(**kwargs) + self.provisioning_state = None + self.endpoint = None + self.input_schema = kwargs.get('input_schema', None) + self.input_schema_mapping = kwargs.get('input_schema_mapping', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py 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..3ad4d5ed9b64 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Domain(TrackedResource): + """EventGrid Domain. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + :param location: Required. Location of the resource + :type location: str + :param tags: Tags of the resource + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the domain. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Canceled', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.eventgrid.models.DomainProvisioningState + :ivar endpoint: Endpoint for the domain. + :vartype endpoint: str + :param input_schema: This determines the format that Event Grid should + expect for incoming events published to the domain. Possible values + include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' + :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema + :param input_schema_mapping: Information about the InputSchemaMapping + which specified the info about mapping event payload. + :type input_schema_mapping: + ~azure.mgmt.eventgrid.models.InputSchemaMapping + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, + 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, + } + + def __init__(self, *, location: str, tags=None, input_schema=None, input_schema_mapping=None, **kwargs) -> None: + super(Domain, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.endpoint = None + self.input_schema = input_schema + self.input_schema_mapping = input_schema_mapping diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py 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..df6ae9d607d4 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.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 .resource import Resource + + +class DomainTopic(Resource): + """Domain Topic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py 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..04e31b7eae80 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_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 .resource_py3 import Resource + + +class DomainTopic(Resource): + """Domain Topic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py 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 3a265b2304c5..2c766d90cdb4 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,7 +12,7 @@ from enum import Enum -class EventSubscriptionProvisioningState(str, Enum): +class DomainProvisioningState(str, Enum): creating = "Creating" updating = "Updating" @@ -20,17 +20,16 @@ class EventSubscriptionProvisioningState(str, Enum): succeeded = "Succeeded" canceled = "Canceled" failed = "Failed" - awaiting_manual_action = "AwaitingManualAction" -class EventDeliverySchema(str, Enum): +class InputSchema(str, Enum): event_grid_schema = "EventGridSchema" - input_event_schema = "InputEventSchema" + custom_event_schema = "CustomEventSchema" cloud_event_v01_schema = "CloudEventV01Schema" -class TopicProvisioningState(str, Enum): +class EventSubscriptionProvisioningState(str, Enum): creating = "Creating" updating = "Updating" @@ -38,13 +37,24 @@ class TopicProvisioningState(str, Enum): succeeded = "Succeeded" canceled = "Canceled" failed = "Failed" + awaiting_manual_action = "AwaitingManualAction" -class InputSchema(str, Enum): +class EventDeliverySchema(str, Enum): event_grid_schema = "EventGridSchema" - custom_event_schema = "CustomEventSchema" cloud_event_v01_schema = "CloudEventV01Schema" + custom_input_schema = "CustomInputSchema" + + +class TopicProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + deleting = "Deleting" + succeeded = "Succeeded" + canceled = "Canceled" + failed = "Failed" class ResourceRegionType(str, Enum): 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 6e7fb83355d4..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,10 +39,11 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "InputEventSchema" . + '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 @@ -71,6 +72,7 @@ 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'}, @@ -83,6 +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.event_delivery_schema = kwargs.get('event_delivery_schema', "InputEventSchema") + self.expiration_time_utc = kwargs.get('expiration_time_utc', None) + self.event_delivery_schema = kwargs.get('event_delivery_schema', None) self.retry_policy = kwargs.get('retry_policy', None) self.dead_letter_destination = kwargs.get('dead_letter_destination', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py index 0b2466b19281..df5e5050e604 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py @@ -33,6 +33,8 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool + :param advanced_filters: A list of advanced filters. + :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -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..16c946cd2363 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py @@ -33,6 +33,8 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool + :param advanced_filters: A list of advanced filters. + :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -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 59cb87e4c9f5..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,10 +39,11 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "InputEventSchema" . + '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 @@ -71,18 +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, event_delivery_schema="InputEventSchema", 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 07b295319084..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,9 +23,12 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema' + '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 @@ -41,6 +44,7 @@ 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'}, @@ -51,6 +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 f88ad534e83f..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,9 +23,12 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema' + '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 @@ -41,16 +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, event_delivery_schema=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/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..d613515b9528 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberGreaterThanAdvancedFilter(AdvancedFilter): + """NumberGreaterThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberGreaterThanAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py new file mode 100644 index 000000000000..29a878af007f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberGreaterThanAdvancedFilter(AdvancedFilter): + """NumberGreaterThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberGreaterThanAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py new file mode 100644 index 000000000000..47e4bf38b609 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberGreaterThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py new file mode 100644 index 000000000000..07597f50cf46 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberGreaterThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py new file mode 100644 index 000000000000..ab5211aa1247 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberInAdvancedFilter(AdvancedFilter): + """NumberIn filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, **kwargs): + super(NumberInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py new file mode 100644 index 000000000000..5358d30a87df --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberInAdvancedFilter(AdvancedFilter): + """NumberIn filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(NumberInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py new file mode 100644 index 000000000000..f2f24e157e32 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberLessThanAdvancedFilter(AdvancedFilter): + """NumberLessThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberLessThanAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py new file mode 100644 index 000000000000..f1e2d64c692f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberLessThanAdvancedFilter(AdvancedFilter): + """NumberLessThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberLessThanAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py new file mode 100644 index 000000000000..fc563b5f1480 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberLessThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py new file mode 100644 index 000000000000..d0cb3a127cec --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberLessThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py new file mode 100644 index 000000000000..790f5f48697f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberNotInAdvancedFilter(AdvancedFilter): + """NumberNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, **kwargs): + super(NumberNotInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py new file mode 100644 index 000000000000..8fa0af24af0e --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberNotInAdvancedFilter(AdvancedFilter): + """NumberNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(NumberNotInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/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..a6d1f91f8eaa --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringBeginsWithAdvancedFilter(AdvancedFilter): + """StringBeginsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringBeginsWithAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py new file mode 100644 index 000000000000..4b33c1bf1bd1 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringBeginsWithAdvancedFilter(AdvancedFilter): + """StringBeginsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringBeginsWithAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py new file mode 100644 index 000000000000..04667aeeb31d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringContainsAdvancedFilter(AdvancedFilter): + """StringContains Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringContainsAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py new file mode 100644 index 000000000000..53b7a530d9ed --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringContainsAdvancedFilter(AdvancedFilter): + """StringContains Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringContainsAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py new file mode 100644 index 000000000000..8413d1ae330d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringEndsWithAdvancedFilter(AdvancedFilter): + """StringEndsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringEndsWithAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py new file mode 100644 index 000000000000..47b469c98e79 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringEndsWithAdvancedFilter(AdvancedFilter): + """StringEndsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringEndsWithAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py new file mode 100644 index 000000000000..52b480d90433 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringInAdvancedFilter(AdvancedFilter): + """StringIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py new file mode 100644 index 000000000000..1da9dc34ac6b --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringInAdvancedFilter(AdvancedFilter): + """StringIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py new file mode 100644 index 000000000000..0621f0f9dfc4 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringNotInAdvancedFilter(AdvancedFilter): + """StringNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringNotInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py new file mode 100644 index 000000000000..d115f4c12266 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringNotInAdvancedFilter(AdvancedFilter): + """StringNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringNotInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/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..8c89845989e1 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py @@ -0,0 +1,179 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DomainTopicsOperations(object): + """DomainTopicsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-15-preview" + + self.config = config + + def get( + self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): + """Get a domain topic. + + Get properties of a domain topic. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param topic_name: Name of the topic + :type topic_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainTopic or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.DomainTopic or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'topicName': self._serialize.url("topic_name", topic_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DomainTopic', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}'} + + def list_by_domain( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """List domain topics. + + List all the topics in a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Domain name. + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainTopic + :rtype: + ~azure.mgmt.eventgrid.models.DomainTopicPaged[~azure.mgmt.eventgrid.models.DomainTopic] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_domain.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py new file mode 100644 index 000000000000..f7f9bd42690d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py @@ -0,0 +1,669 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-15-preview" + + self.config = config + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Get a domain. + + Get properties of a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_info, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a domain. + + Asynchronously creates a new domain with the specified parameters. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param domain_info: Domain information + :type domain_info: ~azure.mgmt.eventgrid.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain_info=domain_info, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + + def _delete_initial( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a domain. + + Delete existing domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + + def _update_initial( + self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, **operation_config): + domain_update_parameters = models.DomainUpdateParameters(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_update_parameters, 'DomainUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a domain. + + Asynchronously updates a domain with the specified parameters. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param tags: Tags of the domains resource + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """List domains under an Azure subscription. + + List all the domains under an Azure subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List domains under a resource group. + + List all the domains under a resource group. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains'} + + def list_shared_access_keys( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """List keys for a domain. + + List the two keys used to publish to a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainSharedAccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_shared_access_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DomainSharedAccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys'} + + def regenerate_key( + self, resource_group_name, domain_name, key_name, custom_headers=None, raw=False, **operation_config): + """Regenerate key for a domain. + + Regenerate a shared access key for a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param key_name: Key name to regenerate key1 or key2 + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainSharedAccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_key_request = models.DomainRegenerateKeyRequest(key_name=key_name) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_key_request, 'DomainRegenerateKeyRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DomainSharedAccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py index 413ca68989b7..e0babad2bffc 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py @@ -25,7 +25,7 @@ class EventSubscriptionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-preview" self.config = config @@ -1162,3 +1162,80 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions'} + + def list_by_domain_topic( + self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): + """List all event subscriptions for a specific domain topic. + + List all event subscriptions that have been created for a specific + domain topic. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the top level domain + :type domain_name: str + :param topic_name: Name of the domain topic + :type topic_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EventSubscription + :rtype: + ~azure.mgmt.eventgrid.models.EventSubscriptionPaged[~azure.mgmt.eventgrid.models.EventSubscription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_domain_topic.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'topicName': self._serialize.url("topic_name", topic_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_domain_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py index dc9600e337bb..d7e84f37b171 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-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 ab63c82604f6..a1bb6fb80e13 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py @@ -23,7 +23,7 @@ class TopicTypesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-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 9b739c76d128..7c58f7ef1a5a 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py @@ -25,7 +25,7 @@ class TopicsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-preview" self.config = config From 63ecee6e1caed93ca5bf6a83dbc3cfc335de4fbe Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 18 Sep 2018 17:27:40 -0700 Subject: [PATCH 05/10] Generated from 731d3b6b72a89918dcd03171a26854c8e55b4147 (#3364) README.md changes: Updated default tag for global settings and updates to multi-api settings. --- .../eventgrid/event_grid_management_client.py | 12 +- .../azure/mgmt/eventgrid/models/__init__.py | 70 +- .../mgmt/eventgrid/models/advanced_filter.py | 53 -- .../eventgrid/models/advanced_filter_py3.py | 53 -- .../models/bool_equals_advanced_filter.py | 42 -- .../models/bool_equals_advanced_filter_py3.py | 42 -- .../azure/mgmt/eventgrid/models/domain.py | 76 -- .../mgmt/eventgrid/models/domain_paged.py | 27 - .../azure/mgmt/eventgrid/models/domain_py3.py | 76 -- .../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 | 42 -- .../eventgrid/models/domain_topic_paged.py | 27 - .../mgmt/eventgrid/models/domain_topic_py3.py | 42 -- .../models/domain_update_parameters.py | 28 - .../models/domain_update_parameters_py3.py | 28 - .../event_grid_management_client_enums.py | 24 +- .../eventgrid/models/event_subscription.py | 9 +- .../models/event_subscription_filter.py | 4 - .../models/event_subscription_filter_py3.py | 6 +- .../models/event_subscription_py3.py | 9 +- .../event_subscription_update_parameters.py | 7 +- ...vent_subscription_update_parameters_py3.py | 9 +- .../number_greater_than_advanced_filter.py | 42 -- ...number_greater_than_advanced_filter_py3.py | 42 -- ..._greater_than_or_equals_advanced_filter.py | 42 -- ...ater_than_or_equals_advanced_filter_py3.py | 42 -- .../models/number_in_advanced_filter.py | 42 -- .../models/number_in_advanced_filter_py3.py | 42 -- .../number_less_than_advanced_filter.py | 42 -- .../number_less_than_advanced_filter_py3.py | 42 -- ...ber_less_than_or_equals_advanced_filter.py | 42 -- ...less_than_or_equals_advanced_filter_py3.py | 42 -- .../models/number_not_in_advanced_filter.py | 42 -- .../number_not_in_advanced_filter_py3.py | 42 -- .../string_begins_with_advanced_filter.py | 42 -- .../string_begins_with_advanced_filter_py3.py | 42 -- .../models/string_contains_advanced_filter.py | 42 -- .../string_contains_advanced_filter_py3.py | 42 -- .../string_ends_with_advanced_filter.py | 42 -- .../string_ends_with_advanced_filter_py3.py | 42 -- .../models/string_in_advanced_filter.py | 42 -- .../models/string_in_advanced_filter_py3.py | 42 -- .../models/string_not_in_advanced_filter.py | 42 -- .../string_not_in_advanced_filter_py3.py | 42 -- .../mgmt/eventgrid/operations/__init__.py | 4 - .../operations/domain_topics_operations.py | 179 ----- .../operations/domains_operations.py | 669 ------------------ .../event_subscriptions_operations.py | 81 +-- .../mgmt/eventgrid/operations/operations.py | 4 +- .../operations/topic_types_operations.py | 4 +- .../eventgrid/operations/topics_operations.py | 4 +- 54 files changed, 31 insertions(+), 2656 deletions(-) delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py delete mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py delete 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 b0378dea2479..b5a272315294 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/event_grid_management_client.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/event_grid_management_client.py @@ -13,8 +13,6 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.domains_operations import DomainsOperations -from .operations.domain_topics_operations import DomainTopicsOperations from .operations.event_subscriptions_operations import EventSubscriptionsOperations from .operations.operations import Operations from .operations.topics_operations import TopicsOperations @@ -62,10 +60,6 @@ class EventGridManagementClient(SDKClient): :ivar config: Configuration for client. :vartype config: EventGridManagementClientConfiguration - :ivar domains: Domains operations - :vartype domains: azure.mgmt.eventgrid.operations.DomainsOperations - :ivar domain_topics: DomainTopics operations - :vartype domain_topics: azure.mgmt.eventgrid.operations.DomainTopicsOperations :ivar event_subscriptions: EventSubscriptions operations :vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations :ivar operations: Operations operations @@ -92,14 +86,10 @@ def __init__( super(EventGridManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-09-15-preview' + self.api_version = '2018-05-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 9a4da95511c0..633b89b64252 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py @@ -10,31 +10,12 @@ # -------------------------------------------------------------------------- try: - from .input_schema_mapping_py3 import InputSchemaMapping - from .domain_py3 import Domain - from .domain_update_parameters_py3 import DomainUpdateParameters - from .domain_shared_access_keys_py3 import DomainSharedAccessKeys - from .domain_regenerate_key_request_py3 import DomainRegenerateKeyRequest - from .domain_topic_py3 import DomainTopic from .event_subscription_destination_py3 import EventSubscriptionDestination - from .advanced_filter_py3 import AdvancedFilter from .event_subscription_filter_py3 import EventSubscriptionFilter from .retry_policy_py3 import RetryPolicy from .dead_letter_destination_py3 import DeadLetterDestination from .resource_py3 import Resource - from .number_in_advanced_filter_py3 import NumberInAdvancedFilter from .storage_blob_dead_letter_destination_py3 import StorageBlobDeadLetterDestination - from .number_not_in_advanced_filter_py3 import NumberNotInAdvancedFilter - from .number_less_than_advanced_filter_py3 import NumberLessThanAdvancedFilter - from .number_greater_than_advanced_filter_py3 import NumberGreaterThanAdvancedFilter - from .number_less_than_or_equals_advanced_filter_py3 import NumberLessThanOrEqualsAdvancedFilter - from .number_greater_than_or_equals_advanced_filter_py3 import NumberGreaterThanOrEqualsAdvancedFilter - from .bool_equals_advanced_filter_py3 import BoolEqualsAdvancedFilter - from .string_in_advanced_filter_py3 import StringInAdvancedFilter - from .string_not_in_advanced_filter_py3 import StringNotInAdvancedFilter - from .string_begins_with_advanced_filter_py3 import StringBeginsWithAdvancedFilter - from .string_ends_with_advanced_filter_py3 import StringEndsWithAdvancedFilter - from .string_contains_advanced_filter_py3 import StringContainsAdvancedFilter from .web_hook_event_subscription_destination_py3 import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination_py3 import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination_py3 import StorageQueueEventSubscriptionDestination @@ -44,6 +25,7 @@ from .event_subscription_full_url_py3 import EventSubscriptionFullUrl from .operation_info_py3 import OperationInfo from .operation_py3 import Operation + from .input_schema_mapping_py3 import InputSchemaMapping from .json_field_py3 import JsonField from .json_field_with_default_py3 import JsonFieldWithDefault from .json_input_schema_mapping_py3 import JsonInputSchemaMapping @@ -55,31 +37,12 @@ from .event_type_py3 import EventType from .topic_type_info_py3 import TopicTypeInfo except (SyntaxError, ImportError): - from .input_schema_mapping import InputSchemaMapping - from .domain import Domain - from .domain_update_parameters import DomainUpdateParameters - from .domain_shared_access_keys import DomainSharedAccessKeys - from .domain_regenerate_key_request import DomainRegenerateKeyRequest - from .domain_topic import DomainTopic from .event_subscription_destination import EventSubscriptionDestination - from .advanced_filter import AdvancedFilter from .event_subscription_filter import EventSubscriptionFilter from .retry_policy import RetryPolicy from .dead_letter_destination import DeadLetterDestination from .resource import Resource - from .number_in_advanced_filter import NumberInAdvancedFilter from .storage_blob_dead_letter_destination import StorageBlobDeadLetterDestination - from .number_not_in_advanced_filter import NumberNotInAdvancedFilter - from .number_less_than_advanced_filter import NumberLessThanAdvancedFilter - from .number_greater_than_advanced_filter import NumberGreaterThanAdvancedFilter - from .number_less_than_or_equals_advanced_filter import NumberLessThanOrEqualsAdvancedFilter - from .number_greater_than_or_equals_advanced_filter import NumberGreaterThanOrEqualsAdvancedFilter - from .bool_equals_advanced_filter import BoolEqualsAdvancedFilter - from .string_in_advanced_filter import StringInAdvancedFilter - from .string_not_in_advanced_filter import StringNotInAdvancedFilter - from .string_begins_with_advanced_filter import StringBeginsWithAdvancedFilter - from .string_ends_with_advanced_filter import StringEndsWithAdvancedFilter - from .string_contains_advanced_filter import StringContainsAdvancedFilter from .web_hook_event_subscription_destination import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination import StorageQueueEventSubscriptionDestination @@ -89,6 +52,7 @@ from .event_subscription_full_url import EventSubscriptionFullUrl from .operation_info import OperationInfo from .operation import Operation + from .input_schema_mapping import InputSchemaMapping from .json_field import JsonField from .json_field_with_default import JsonFieldWithDefault from .json_input_schema_mapping import JsonInputSchemaMapping @@ -99,49 +63,27 @@ from .topic_regenerate_key_request import TopicRegenerateKeyRequest from .event_type import EventType from .topic_type_info import TopicTypeInfo -from .domain_paged import DomainPaged -from .domain_topic_paged import DomainTopicPaged from .event_subscription_paged import EventSubscriptionPaged from .operation_paged import OperationPaged from .topic_paged import TopicPaged from .event_type_paged import EventTypePaged from .topic_type_info_paged import TopicTypeInfoPaged from .event_grid_management_client_enums import ( - DomainProvisioningState, - InputSchema, EventSubscriptionProvisioningState, EventDeliverySchema, TopicProvisioningState, + InputSchema, ResourceRegionType, TopicTypeProvisioningState, ) __all__ = [ - 'InputSchemaMapping', - 'Domain', - 'DomainUpdateParameters', - 'DomainSharedAccessKeys', - 'DomainRegenerateKeyRequest', - 'DomainTopic', 'EventSubscriptionDestination', - 'AdvancedFilter', 'EventSubscriptionFilter', 'RetryPolicy', 'DeadLetterDestination', 'Resource', - 'NumberInAdvancedFilter', 'StorageBlobDeadLetterDestination', - 'NumberNotInAdvancedFilter', - 'NumberLessThanAdvancedFilter', - 'NumberGreaterThanAdvancedFilter', - 'NumberLessThanOrEqualsAdvancedFilter', - 'NumberGreaterThanOrEqualsAdvancedFilter', - 'BoolEqualsAdvancedFilter', - 'StringInAdvancedFilter', - 'StringNotInAdvancedFilter', - 'StringBeginsWithAdvancedFilter', - 'StringEndsWithAdvancedFilter', - 'StringContainsAdvancedFilter', 'WebHookEventSubscriptionDestination', 'EventHubEventSubscriptionDestination', 'StorageQueueEventSubscriptionDestination', @@ -151,6 +93,7 @@ 'EventSubscriptionFullUrl', 'OperationInfo', 'Operation', + 'InputSchemaMapping', 'JsonField', 'JsonFieldWithDefault', 'JsonInputSchemaMapping', @@ -161,18 +104,15 @@ 'TopicRegenerateKeyRequest', 'EventType', 'TopicTypeInfo', - 'DomainPaged', - 'DomainTopicPaged', 'EventSubscriptionPaged', 'OperationPaged', 'TopicPaged', 'EventTypePaged', 'TopicTypeInfoPaged', - 'DomainProvisioningState', - 'InputSchema', 'EventSubscriptionProvisioningState', 'EventDeliverySchema', 'TopicProvisioningState', + 'InputSchema', 'ResourceRegionType', 'TopicTypeProvisioningState', ] diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py deleted file mode 100644 index 0b166b4a1015..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdvancedFilter(Model): - """Represents an advanced filter that can be used to filter events based on - various event envelope/data fields. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, - StringInAdvancedFilter, StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - } - - _subtype_map = { - 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} - } - - def __init__(self, **kwargs): - super(AdvancedFilter, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py deleted file mode 100644 index 1330bddfa4fa..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdvancedFilter(Model): - """Represents an advanced filter that can be used to filter events based on - various event envelope/data fields. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, - StringInAdvancedFilter, StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - } - - _subtype_map = { - 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} - } - - def __init__(self, *, key: str=None, **kwargs) -> None: - super(AdvancedFilter, self).__init__(**kwargs) - self.key = key - self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py deleted file mode 100644 index ac55b0091505..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class BoolEqualsAdvancedFilter(AdvancedFilter): - """BoolEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: bool - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(BoolEqualsAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py deleted file mode 100644 index c648cc1db73f..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class BoolEqualsAdvancedFilter(AdvancedFilter): - """BoolEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: bool - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bool'}, - } - - def __init__(self, *, key: str=None, value: bool=None, **kwargs) -> None: - super(BoolEqualsAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py deleted file mode 100644 index 868394ac75f0..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class Domain(TrackedResource): - """EventGrid Domain. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param location: Required. Location of the resource - :type location: str - :param tags: Tags of the resource - :type tags: dict[str, str] - :ivar provisioning_state: Provisioning state of the domain. Possible - values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - 'Canceled', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.eventgrid.models.DomainProvisioningState - :ivar endpoint: Endpoint for the domain. - :vartype endpoint: str - :param input_schema: This determines the format that Event Grid should - expect for incoming events published to the domain. Possible values - include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' - :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :param input_schema_mapping: Information about the InputSchemaMapping - which specified the info about mapping event payload. - :type input_schema_mapping: - ~azure.mgmt.eventgrid.models.InputSchemaMapping - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'endpoint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, - 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, - 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, - } - - def __init__(self, **kwargs): - super(Domain, self).__init__(**kwargs) - self.provisioning_state = None - self.endpoint = None - self.input_schema = kwargs.get('input_schema', None) - self.input_schema_mapping = kwargs.get('input_schema_mapping', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py deleted file mode 100644 index ed7fa29c5786..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py deleted file mode 100644 index 3ad4d5ed9b64..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class Domain(TrackedResource): - """EventGrid Domain. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - :param location: Required. Location of the resource - :type location: str - :param tags: Tags of the resource - :type tags: dict[str, str] - :ivar provisioning_state: Provisioning state of the domain. Possible - values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', - 'Canceled', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.eventgrid.models.DomainProvisioningState - :ivar endpoint: Endpoint for the domain. - :vartype endpoint: str - :param input_schema: This determines the format that Event Grid should - expect for incoming events published to the domain. Possible values - include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' - :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :param input_schema_mapping: Information about the InputSchemaMapping - which specified the info about mapping event payload. - :type input_schema_mapping: - ~azure.mgmt.eventgrid.models.InputSchemaMapping - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'endpoint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, - 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, - 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, - } - - def __init__(self, *, location: str, tags=None, input_schema=None, input_schema_mapping=None, **kwargs) -> None: - super(Domain, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.endpoint = None - self.input_schema = input_schema - self.input_schema_mapping = input_schema_mapping diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py deleted file mode 100644 index cacf0e74fb26..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainRegenerateKeyRequest(Model): - """Domain regenerate share access key request. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. Key name to regenerate key1 or key2 - :type key_name: str - """ - - _validation = { - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DomainRegenerateKeyRequest, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py deleted file mode 100644 index 9d024c87c0c6..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainRegenerateKeyRequest(Model): - """Domain regenerate share access key request. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. Key name to regenerate key1 or key2 - :type key_name: str - """ - - _validation = { - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, *, key_name: str, **kwargs) -> None: - super(DomainRegenerateKeyRequest, self).__init__(**kwargs) - self.key_name = key_name diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py deleted file mode 100644 index d04032da4981..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainSharedAccessKeys(Model): - """Shared access keys of the Domain. - - :param key1: Shared access key1 for the domain. - :type key1: str - :param key2: Shared access key2 for the domain. - :type key2: str - """ - - _attribute_map = { - 'key1': {'key': 'key1', 'type': 'str'}, - 'key2': {'key': 'key2', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DomainSharedAccessKeys, self).__init__(**kwargs) - self.key1 = kwargs.get('key1', None) - self.key2 = kwargs.get('key2', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py deleted file mode 100644 index 2c13d4ab0367..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainSharedAccessKeys(Model): - """Shared access keys of the Domain. - - :param key1: Shared access key1 for the domain. - :type key1: str - :param key2: Shared access key2 for the domain. - :type key2: str - """ - - _attribute_map = { - 'key1': {'key': 'key1', 'type': 'str'}, - 'key2': {'key': 'key2', 'type': 'str'}, - } - - def __init__(self, *, key1: str=None, key2: str=None, **kwargs) -> None: - super(DomainSharedAccessKeys, self).__init__(**kwargs) - self.key1 = key1 - self.key2 = key2 diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py deleted file mode 100644 index df6ae9d607d4..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DomainTopic(Resource): - """Domain Topic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py deleted file mode 100644 index b5f599064d3e..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DomainTopicPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainTopic ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainTopic]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainTopicPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py deleted file mode 100644 index 04e31b7eae80..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class DomainTopic(Resource): - """Domain Topic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified identifier of the resource - :vartype id: str - :ivar name: Name of the resource - :vartype name: str - :ivar type: Type of the resource - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py deleted file mode 100644 index 1bc4fca2bc30..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainUpdateParameters(Model): - """Properties of the Domain update. - - :param tags: Tags of the domains resource - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DomainUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py deleted file mode 100644 index f876c6e4adbd..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainUpdateParameters(Model): - """Properties of the Domain update. - - :param tags: Tags of the domains resource - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(DomainUpdateParameters, self).__init__(**kwargs) - self.tags = tags diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_grid_management_client_enums.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_grid_management_client_enums.py index 2c766d90cdb4..3a265b2304c5 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,7 +12,7 @@ from enum import Enum -class DomainProvisioningState(str, Enum): +class EventSubscriptionProvisioningState(str, Enum): creating = "Creating" updating = "Updating" @@ -20,16 +20,17 @@ class DomainProvisioningState(str, Enum): succeeded = "Succeeded" canceled = "Canceled" failed = "Failed" + awaiting_manual_action = "AwaitingManualAction" -class InputSchema(str, Enum): +class EventDeliverySchema(str, Enum): event_grid_schema = "EventGridSchema" - custom_event_schema = "CustomEventSchema" + input_event_schema = "InputEventSchema" cloud_event_v01_schema = "CloudEventV01Schema" -class EventSubscriptionProvisioningState(str, Enum): +class TopicProvisioningState(str, Enum): creating = "Creating" updating = "Updating" @@ -37,24 +38,13 @@ class EventSubscriptionProvisioningState(str, Enum): succeeded = "Succeeded" canceled = "Canceled" failed = "Failed" - awaiting_manual_action = "AwaitingManualAction" -class EventDeliverySchema(str, Enum): +class InputSchema(str, Enum): event_grid_schema = "EventGridSchema" + custom_event_schema = "CustomEventSchema" cloud_event_v01_schema = "CloudEventV01Schema" - custom_input_schema = "CustomInputSchema" - - -class TopicProvisioningState(str, Enum): - - creating = "Creating" - updating = "Updating" - deleting = "Deleting" - succeeded = "Succeeded" - canceled = "Canceled" - failed = "Failed" class ResourceRegionType(str, Enum): 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 fb5f0a3419ce..6e7fb83355d4 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py @@ -39,11 +39,10 @@ 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' + 'InputEventSchema', 'CloudEventV01Schema'. Default value: + "InputEventSchema" . :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -72,7 +71,6 @@ class EventSubscription(Resource): 'destination': {'key': 'properties.destination', 'type': 'EventSubscriptionDestination'}, 'filter': {'key': 'properties.filter', 'type': 'EventSubscriptionFilter'}, 'labels': {'key': 'properties.labels', 'type': '[str]'}, - 'expiration_time_utc': {'key': 'properties.expirationTimeUtc', 'type': 'iso-8601'}, 'event_delivery_schema': {'key': 'properties.eventDeliverySchema', 'type': 'str'}, 'retry_policy': {'key': 'properties.retryPolicy', 'type': 'RetryPolicy'}, 'dead_letter_destination': {'key': 'properties.deadLetterDestination', 'type': 'DeadLetterDestination'}, @@ -85,7 +83,6 @@ 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.event_delivery_schema = kwargs.get('event_delivery_schema', "InputEventSchema") self.retry_policy = kwargs.get('retry_policy', None) self.dead_letter_destination = kwargs.get('dead_letter_destination', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py index df5e5050e604..0b2466b19281 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py @@ -33,8 +33,6 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool - :param advanced_filters: A list of advanced filters. - :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -42,7 +40,6 @@ class EventSubscriptionFilter(Model): 'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'}, 'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'}, 'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'}, - 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'}, } def __init__(self, **kwargs): @@ -51,4 +48,3 @@ def __init__(self, **kwargs): self.subject_ends_with = kwargs.get('subject_ends_with', None) self.included_event_types = kwargs.get('included_event_types', None) self.is_subject_case_sensitive = kwargs.get('is_subject_case_sensitive', False) - self.advanced_filters = kwargs.get('advanced_filters', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py index 16c946cd2363..cc9ddbce65d2 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py @@ -33,8 +33,6 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool - :param advanced_filters: A list of advanced filters. - :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -42,13 +40,11 @@ class EventSubscriptionFilter(Model): 'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'}, 'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'}, 'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'}, - 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'}, } - def __init__(self, *, subject_begins_with: str=None, subject_ends_with: str=None, included_event_types=None, is_subject_case_sensitive: bool=False, advanced_filters=None, **kwargs) -> None: + def __init__(self, *, subject_begins_with: str=None, subject_ends_with: str=None, included_event_types=None, is_subject_case_sensitive: bool=False, **kwargs) -> None: super(EventSubscriptionFilter, self).__init__(**kwargs) self.subject_begins_with = subject_begins_with self.subject_ends_with = subject_ends_with self.included_event_types = included_event_types self.is_subject_case_sensitive = is_subject_case_sensitive - self.advanced_filters = advanced_filters diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_py3.py index 246622ce3702..59cb87e4c9f5 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,11 +39,10 @@ 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' + 'InputEventSchema', 'CloudEventV01Schema'. Default value: + "InputEventSchema" . :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -72,20 +71,18 @@ class EventSubscription(Resource): 'destination': {'key': 'properties.destination', 'type': 'EventSubscriptionDestination'}, 'filter': {'key': 'properties.filter', 'type': 'EventSubscriptionFilter'}, 'labels': {'key': 'properties.labels', 'type': '[str]'}, - 'expiration_time_utc': {'key': 'properties.expirationTimeUtc', 'type': 'iso-8601'}, 'event_delivery_schema': {'key': 'properties.eventDeliverySchema', 'type': 'str'}, 'retry_policy': {'key': 'properties.retryPolicy', 'type': 'RetryPolicy'}, 'dead_letter_destination': {'key': 'properties.deadLetterDestination', 'type': 'DeadLetterDestination'}, } - def __init__(self, *, destination=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + def __init__(self, *, destination=None, filter=None, labels=None, event_delivery_schema="InputEventSchema", 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 5371a06679cc..07b295319084 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,12 +23,9 @@ 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' + 'InputEventSchema', 'CloudEventV01Schema' :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -44,7 +41,6 @@ class EventSubscriptionUpdateParameters(Model): 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'}, 'filter': {'key': 'filter', 'type': 'EventSubscriptionFilter'}, 'labels': {'key': 'labels', 'type': '[str]'}, - 'expiration_time_utc': {'key': 'expirationTimeUtc', 'type': 'iso-8601'}, 'event_delivery_schema': {'key': 'eventDeliverySchema', 'type': 'str'}, 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, 'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'}, @@ -55,7 +51,6 @@ 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 3f415aa3e8cb..f88ad534e83f 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,12 +23,9 @@ 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' + 'InputEventSchema', 'CloudEventV01Schema' :type event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to @@ -44,18 +41,16 @@ class EventSubscriptionUpdateParameters(Model): 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'}, 'filter': {'key': 'filter', 'type': 'EventSubscriptionFilter'}, 'labels': {'key': 'labels', 'type': '[str]'}, - 'expiration_time_utc': {'key': 'expirationTimeUtc', 'type': 'iso-8601'}, 'event_delivery_schema': {'key': 'eventDeliverySchema', 'type': 'str'}, 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, 'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'}, } - def __init__(self, *, destination=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + def __init__(self, *, destination=None, filter=None, labels=None, 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/number_greater_than_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py deleted file mode 100644 index d613515b9528..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberGreaterThanAdvancedFilter(AdvancedFilter): - """NumberGreaterThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberGreaterThanAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py deleted file mode 100644 index 29a878af007f..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberGreaterThanAdvancedFilter(AdvancedFilter): - """NumberGreaterThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberGreaterThanAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py deleted file mode 100644 index 47e4bf38b609..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberGreaterThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py deleted file mode 100644 index 07597f50cf46..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberGreaterThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py deleted file mode 100644 index ab5211aa1247..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberInAdvancedFilter(AdvancedFilter): - """NumberIn filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, **kwargs): - super(NumberInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py deleted file mode 100644 index 5358d30a87df..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberInAdvancedFilter(AdvancedFilter): - """NumberIn filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(NumberInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py deleted file mode 100644 index f2f24e157e32..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberLessThanAdvancedFilter(AdvancedFilter): - """NumberLessThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberLessThanAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py deleted file mode 100644 index f1e2d64c692f..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberLessThanAdvancedFilter(AdvancedFilter): - """NumberLessThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberLessThanAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py deleted file mode 100644 index fc563b5f1480..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberLessThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py deleted file mode 100644 index d0cb3a127cec..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberLessThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py deleted file mode 100644 index 790f5f48697f..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberNotInAdvancedFilter(AdvancedFilter): - """NumberNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, **kwargs): - super(NumberNotInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py deleted file mode 100644 index 8fa0af24af0e..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberNotInAdvancedFilter(AdvancedFilter): - """NumberNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(NumberNotInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py deleted file mode 100644 index a6d1f91f8eaa..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringBeginsWithAdvancedFilter(AdvancedFilter): - """StringBeginsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringBeginsWithAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py deleted file mode 100644 index 4b33c1bf1bd1..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringBeginsWithAdvancedFilter(AdvancedFilter): - """StringBeginsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringBeginsWithAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py deleted file mode 100644 index 04667aeeb31d..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringContainsAdvancedFilter(AdvancedFilter): - """StringContains Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringContainsAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py deleted file mode 100644 index 53b7a530d9ed..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringContainsAdvancedFilter(AdvancedFilter): - """StringContains Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringContainsAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py deleted file mode 100644 index 8413d1ae330d..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringEndsWithAdvancedFilter(AdvancedFilter): - """StringEndsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringEndsWithAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py deleted file mode 100644 index 47b469c98e79..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringEndsWithAdvancedFilter(AdvancedFilter): - """StringEndsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringEndsWithAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py deleted file mode 100644 index 52b480d90433..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringInAdvancedFilter(AdvancedFilter): - """StringIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py deleted file mode 100644 index 1da9dc34ac6b..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringInAdvancedFilter(AdvancedFilter): - """StringIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py deleted file mode 100644 index 0621f0f9dfc4..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringNotInAdvancedFilter(AdvancedFilter): - """StringNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringNotInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py deleted file mode 100644 index d115f4c12266..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringNotInAdvancedFilter(AdvancedFilter): - """StringNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with upto two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringNotInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py index 809a02494719..db9b4311e47c 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py @@ -9,16 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .domains_operations import DomainsOperations -from .domain_topics_operations import DomainTopicsOperations from .event_subscriptions_operations import EventSubscriptionsOperations from .operations import Operations from .topics_operations import TopicsOperations from .topic_types_operations import TopicTypesOperations __all__ = [ - 'DomainsOperations', - 'DomainTopicsOperations', 'EventSubscriptionsOperations', 'Operations', 'TopicsOperations', diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py deleted file mode 100644 index 8c89845989e1..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DomainTopicsOperations(object): - """DomainTopicsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-15-preview" - - self.config = config - - def get( - self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): - """Get a domain topic. - - Get properties of a domain topic. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param topic_name: Name of the topic - :type topic_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainTopic or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.DomainTopic or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str'), - 'topicName': self._serialize.url("topic_name", topic_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DomainTopic', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}'} - - def list_by_domain( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """List domain topics. - - List all the topics in a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Domain name. - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainTopic - :rtype: - ~azure.mgmt.eventgrid.models.DomainTopicPaged[~azure.mgmt.eventgrid.models.DomainTopic] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_domain.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py deleted file mode 100644 index f7f9bd42690d..000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py +++ /dev/null @@ -1,669 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-15-preview" - - self.config = config - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Get a domain. - - Get properties of a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_info, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, polling=True, **operation_config): - """Create a domain. - - Asynchronously creates a new domain with the specified parameters. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param domain_info: Domain information - :type domain_info: ~azure.mgmt.eventgrid.models.Domain - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain_info=domain_info, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - - def _delete_initial( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a domain. - - Delete existing domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - - def _update_initial( - self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, **operation_config): - domain_update_parameters = models.DomainUpdateParameters(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_update_parameters, 'DomainUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a domain. - - Asynchronously updates a domain with the specified parameters. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param tags: Tags of the domains resource - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """List domains under an Azure subscription. - - List all the domains under an Azure subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List domains under a resource group. - - List all the domains under a resource group. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains'} - - def list_shared_access_keys( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """List keys for a domain. - - List the two keys used to publish to a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainSharedAccessKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_shared_access_keys.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DomainSharedAccessKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys'} - - def regenerate_key( - self, resource_group_name, domain_name, key_name, custom_headers=None, raw=False, **operation_config): - """Regenerate key for a domain. - - Regenerate a shared access key for a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param key_name: Key name to regenerate key1 or key2 - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainSharedAccessKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - regenerate_key_request = models.DomainRegenerateKeyRequest(key_name=key_name) - - # Construct URL - url = self.regenerate_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(regenerate_key_request, 'DomainRegenerateKeyRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DomainSharedAccessKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py index e0babad2bffc..413ca68989b7 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py @@ -25,7 +25,7 @@ class EventSubscriptionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-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 = "2018-09-15-preview" + self.api_version = "2018-05-01-preview" self.config = config @@ -1162,80 +1162,3 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions'} - - def list_by_domain_topic( - self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): - """List all event subscriptions for a specific domain topic. - - List all event subscriptions that have been created for a specific - domain topic. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the top level domain - :type domain_name: str - :param topic_name: Name of the domain topic - :type topic_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of EventSubscription - :rtype: - ~azure.mgmt.eventgrid.models.EventSubscriptionPaged[~azure.mgmt.eventgrid.models.EventSubscription] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_domain_topic.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str'), - 'topicName': self._serialize.url("topic_name", topic_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_domain_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py index d7e84f37b171..dc9600e337bb 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-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 = "2018-09-15-preview" + self.api_version = "2018-05-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 a1bb6fb80e13..ab63c82604f6 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py @@ -23,7 +23,7 @@ class TopicTypesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-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 = "2018-09-15-preview" + self.api_version = "2018-05-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 7c58f7ef1a5a..9b739c76d128 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py @@ -25,7 +25,7 @@ class TopicsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-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 = "2018-09-15-preview" + self.api_version = "2018-05-01-preview" self.config = config From d22b4e83479a57b7191e0e096d585fcd3e0a7c17 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 18 Oct 2018 12:50:04 -0700 Subject: [PATCH 06/10] =?UTF-8?q?[AutoPR=20eventgrid/resource-manager]=20E?= =?UTF-8?q?ventGrid:=20Update=20README=20files=20to=20include=20the=20curr?= =?UTF-8?q?ent=20new=20preview=20api=E2=80=A6=20(#3615)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Generated from ce8469266acf934b97b1cc71b6610123b24710b6 EventGrid: Update README files to include the current new preview api version 2018-09-preview * Packaging update of azure-mgmt-eventgrid --- azure-mgmt-eventgrid/MANIFEST.in | 1 - azure-mgmt-eventgrid/azure/__init__.py | 2 +- azure-mgmt-eventgrid/azure/mgmt/__init__.py | 2 +- .../eventgrid/event_grid_management_client.py | 12 +- .../azure/mgmt/eventgrid/models/__init__.py | 70 +- .../mgmt/eventgrid/models/advanced_filter.py | 53 ++ .../eventgrid/models/advanced_filter_py3.py | 53 ++ .../models/bool_equals_advanced_filter.py | 42 ++ .../models/bool_equals_advanced_filter_py3.py | 42 ++ .../azure/mgmt/eventgrid/models/domain.py | 76 ++ .../mgmt/eventgrid/models/domain_paged.py | 27 + .../azure/mgmt/eventgrid/models/domain_py3.py | 76 ++ .../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 | 42 ++ .../eventgrid/models/domain_topic_paged.py | 27 + .../mgmt/eventgrid/models/domain_topic_py3.py | 42 ++ .../models/domain_update_parameters.py | 28 + .../models/domain_update_parameters_py3.py | 28 + .../event_grid_management_client_enums.py | 24 +- .../eventgrid/models/event_subscription.py | 9 +- .../models/event_subscription_filter.py | 4 + .../models/event_subscription_filter_py3.py | 6 +- .../models/event_subscription_py3.py | 9 +- .../event_subscription_update_parameters.py | 7 +- ...vent_subscription_update_parameters_py3.py | 9 +- .../number_greater_than_advanced_filter.py | 42 ++ ...number_greater_than_advanced_filter_py3.py | 42 ++ ..._greater_than_or_equals_advanced_filter.py | 42 ++ ...ater_than_or_equals_advanced_filter_py3.py | 42 ++ .../models/number_in_advanced_filter.py | 42 ++ .../models/number_in_advanced_filter_py3.py | 42 ++ .../number_less_than_advanced_filter.py | 42 ++ .../number_less_than_advanced_filter_py3.py | 42 ++ ...ber_less_than_or_equals_advanced_filter.py | 42 ++ ...less_than_or_equals_advanced_filter_py3.py | 42 ++ .../models/number_not_in_advanced_filter.py | 42 ++ .../number_not_in_advanced_filter_py3.py | 42 ++ .../string_begins_with_advanced_filter.py | 42 ++ .../string_begins_with_advanced_filter_py3.py | 42 ++ .../models/string_contains_advanced_filter.py | 42 ++ .../string_contains_advanced_filter_py3.py | 42 ++ .../string_ends_with_advanced_filter.py | 42 ++ .../string_ends_with_advanced_filter_py3.py | 42 ++ .../models/string_in_advanced_filter.py | 42 ++ .../models/string_in_advanced_filter_py3.py | 42 ++ .../models/string_not_in_advanced_filter.py | 42 ++ .../string_not_in_advanced_filter_py3.py | 42 ++ .../mgmt/eventgrid/operations/__init__.py | 4 + .../operations/domain_topics_operations.py | 179 +++++ .../operations/domains_operations.py | 669 ++++++++++++++++++ .../event_subscriptions_operations.py | 81 ++- .../mgmt/eventgrid/operations/operations.py | 4 +- .../operations/topic_types_operations.py | 4 +- .../eventgrid/operations/topics_operations.py | 4 +- azure-mgmt-eventgrid/azure_bdist_wheel.py | 54 -- azure-mgmt-eventgrid/setup.cfg | 1 - azure-mgmt-eventgrid/setup.py | 17 +- 60 files changed, 2667 insertions(+), 97 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/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/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 delete mode 100644 azure-mgmt-eventgrid/azure_bdist_wheel.py diff --git a/azure-mgmt-eventgrid/MANIFEST.in b/azure-mgmt-eventgrid/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-eventgrid/MANIFEST.in +++ b/azure-mgmt-eventgrid/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-eventgrid/azure/__init__.py b/azure-mgmt-eventgrid/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-eventgrid/azure/__init__.py +++ b/azure-mgmt-eventgrid/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-eventgrid/azure/mgmt/__init__.py b/azure-mgmt-eventgrid/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file 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 b5a272315294..b0378dea2479 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 = '2018-05-01-preview' + self.api_version = '2018-09-15-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 633b89b64252..9a4da95511c0 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py @@ -10,12 +10,31 @@ # -------------------------------------------------------------------------- try: + from .input_schema_mapping_py3 import InputSchemaMapping + from .domain_py3 import Domain + from .domain_update_parameters_py3 import DomainUpdateParameters + from .domain_shared_access_keys_py3 import DomainSharedAccessKeys + from .domain_regenerate_key_request_py3 import DomainRegenerateKeyRequest + from .domain_topic_py3 import DomainTopic from .event_subscription_destination_py3 import EventSubscriptionDestination + from .advanced_filter_py3 import AdvancedFilter from .event_subscription_filter_py3 import EventSubscriptionFilter from .retry_policy_py3 import RetryPolicy from .dead_letter_destination_py3 import DeadLetterDestination from .resource_py3 import Resource + from .number_in_advanced_filter_py3 import NumberInAdvancedFilter from .storage_blob_dead_letter_destination_py3 import StorageBlobDeadLetterDestination + from .number_not_in_advanced_filter_py3 import NumberNotInAdvancedFilter + from .number_less_than_advanced_filter_py3 import NumberLessThanAdvancedFilter + from .number_greater_than_advanced_filter_py3 import NumberGreaterThanAdvancedFilter + from .number_less_than_or_equals_advanced_filter_py3 import NumberLessThanOrEqualsAdvancedFilter + from .number_greater_than_or_equals_advanced_filter_py3 import NumberGreaterThanOrEqualsAdvancedFilter + from .bool_equals_advanced_filter_py3 import BoolEqualsAdvancedFilter + from .string_in_advanced_filter_py3 import StringInAdvancedFilter + from .string_not_in_advanced_filter_py3 import StringNotInAdvancedFilter + from .string_begins_with_advanced_filter_py3 import StringBeginsWithAdvancedFilter + from .string_ends_with_advanced_filter_py3 import StringEndsWithAdvancedFilter + from .string_contains_advanced_filter_py3 import StringContainsAdvancedFilter from .web_hook_event_subscription_destination_py3 import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination_py3 import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination_py3 import StorageQueueEventSubscriptionDestination @@ -25,7 +44,6 @@ from .event_subscription_full_url_py3 import EventSubscriptionFullUrl from .operation_info_py3 import OperationInfo from .operation_py3 import Operation - from .input_schema_mapping_py3 import InputSchemaMapping from .json_field_py3 import JsonField from .json_field_with_default_py3 import JsonFieldWithDefault from .json_input_schema_mapping_py3 import JsonInputSchemaMapping @@ -37,12 +55,31 @@ from .event_type_py3 import EventType from .topic_type_info_py3 import TopicTypeInfo except (SyntaxError, ImportError): + from .input_schema_mapping import InputSchemaMapping + from .domain import Domain + from .domain_update_parameters import DomainUpdateParameters + from .domain_shared_access_keys import DomainSharedAccessKeys + from .domain_regenerate_key_request import DomainRegenerateKeyRequest + from .domain_topic import DomainTopic from .event_subscription_destination import EventSubscriptionDestination + from .advanced_filter import AdvancedFilter from .event_subscription_filter import EventSubscriptionFilter from .retry_policy import RetryPolicy from .dead_letter_destination import DeadLetterDestination from .resource import Resource + from .number_in_advanced_filter import NumberInAdvancedFilter from .storage_blob_dead_letter_destination import StorageBlobDeadLetterDestination + from .number_not_in_advanced_filter import NumberNotInAdvancedFilter + from .number_less_than_advanced_filter import NumberLessThanAdvancedFilter + from .number_greater_than_advanced_filter import NumberGreaterThanAdvancedFilter + from .number_less_than_or_equals_advanced_filter import NumberLessThanOrEqualsAdvancedFilter + from .number_greater_than_or_equals_advanced_filter import NumberGreaterThanOrEqualsAdvancedFilter + from .bool_equals_advanced_filter import BoolEqualsAdvancedFilter + from .string_in_advanced_filter import StringInAdvancedFilter + from .string_not_in_advanced_filter import StringNotInAdvancedFilter + from .string_begins_with_advanced_filter import StringBeginsWithAdvancedFilter + from .string_ends_with_advanced_filter import StringEndsWithAdvancedFilter + from .string_contains_advanced_filter import StringContainsAdvancedFilter from .web_hook_event_subscription_destination import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination import StorageQueueEventSubscriptionDestination @@ -52,7 +89,6 @@ from .event_subscription_full_url import EventSubscriptionFullUrl from .operation_info import OperationInfo from .operation import Operation - from .input_schema_mapping import InputSchemaMapping from .json_field import JsonField from .json_field_with_default import JsonFieldWithDefault from .json_input_schema_mapping import JsonInputSchemaMapping @@ -63,27 +99,49 @@ from .topic_regenerate_key_request import TopicRegenerateKeyRequest from .event_type import EventType from .topic_type_info import TopicTypeInfo +from .domain_paged import DomainPaged +from .domain_topic_paged import DomainTopicPaged from .event_subscription_paged import EventSubscriptionPaged from .operation_paged import OperationPaged from .topic_paged import TopicPaged from .event_type_paged import EventTypePaged from .topic_type_info_paged import TopicTypeInfoPaged from .event_grid_management_client_enums import ( + DomainProvisioningState, + InputSchema, EventSubscriptionProvisioningState, EventDeliverySchema, TopicProvisioningState, - InputSchema, ResourceRegionType, TopicTypeProvisioningState, ) __all__ = [ + 'InputSchemaMapping', + 'Domain', + 'DomainUpdateParameters', + 'DomainSharedAccessKeys', + 'DomainRegenerateKeyRequest', + 'DomainTopic', 'EventSubscriptionDestination', + 'AdvancedFilter', 'EventSubscriptionFilter', 'RetryPolicy', 'DeadLetterDestination', 'Resource', + 'NumberInAdvancedFilter', 'StorageBlobDeadLetterDestination', + 'NumberNotInAdvancedFilter', + 'NumberLessThanAdvancedFilter', + 'NumberGreaterThanAdvancedFilter', + 'NumberLessThanOrEqualsAdvancedFilter', + 'NumberGreaterThanOrEqualsAdvancedFilter', + 'BoolEqualsAdvancedFilter', + 'StringInAdvancedFilter', + 'StringNotInAdvancedFilter', + 'StringBeginsWithAdvancedFilter', + 'StringEndsWithAdvancedFilter', + 'StringContainsAdvancedFilter', 'WebHookEventSubscriptionDestination', 'EventHubEventSubscriptionDestination', 'StorageQueueEventSubscriptionDestination', @@ -93,7 +151,6 @@ 'EventSubscriptionFullUrl', 'OperationInfo', 'Operation', - 'InputSchemaMapping', 'JsonField', 'JsonFieldWithDefault', 'JsonInputSchemaMapping', @@ -104,15 +161,18 @@ 'TopicRegenerateKeyRequest', 'EventType', 'TopicTypeInfo', + 'DomainPaged', + 'DomainTopicPaged', 'EventSubscriptionPaged', 'OperationPaged', 'TopicPaged', 'EventTypePaged', 'TopicTypeInfoPaged', + 'DomainProvisioningState', + 'InputSchema', 'EventSubscriptionProvisioningState', 'EventDeliverySchema', 'TopicProvisioningState', - 'InputSchema', '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..0b166b4a1015 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdvancedFilter(Model): + """Represents an advanced filter that can be used to filter events based on + various event envelope/data fields. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, + NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, + NumberLessThanOrEqualsAdvancedFilter, + NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, + StringInAdvancedFilter, StringNotInAdvancedFilter, + StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, + StringContainsAdvancedFilter + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + } + + _subtype_map = { + 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} + } + + def __init__(self, **kwargs): + super(AdvancedFilter, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py new file mode 100644 index 000000000000..1330bddfa4fa --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdvancedFilter(Model): + """Represents an advanced filter that can be used to filter events based on + various event envelope/data fields. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, + NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, + NumberLessThanOrEqualsAdvancedFilter, + NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, + StringInAdvancedFilter, StringNotInAdvancedFilter, + StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, + StringContainsAdvancedFilter + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + } + + _subtype_map = { + 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} + } + + def __init__(self, *, key: str=None, **kwargs) -> None: + super(AdvancedFilter, self).__init__(**kwargs) + self.key = key + self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py new file mode 100644 index 000000000000..ac55b0091505 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class BoolEqualsAdvancedFilter(AdvancedFilter): + """BoolEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: bool + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(BoolEqualsAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py new file mode 100644 index 000000000000..c648cc1db73f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class BoolEqualsAdvancedFilter(AdvancedFilter): + """BoolEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: bool + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, *, key: str=None, value: bool=None, **kwargs) -> None: + super(BoolEqualsAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py new file mode 100644 index 000000000000..868394ac75f0 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class Domain(TrackedResource): + """EventGrid Domain. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + :param location: Required. Location of the resource + :type location: str + :param tags: Tags of the resource + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the domain. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Canceled', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.eventgrid.models.DomainProvisioningState + :ivar endpoint: Endpoint for the domain. + :vartype endpoint: str + :param input_schema: This determines the format that Event Grid should + expect for incoming events published to the domain. Possible values + include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' + :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema + :param input_schema_mapping: Information about the InputSchemaMapping + which specified the info about mapping event payload. + :type input_schema_mapping: + ~azure.mgmt.eventgrid.models.InputSchemaMapping + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, + 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, + } + + def __init__(self, **kwargs): + super(Domain, self).__init__(**kwargs) + self.provisioning_state = None + self.endpoint = None + self.input_schema = kwargs.get('input_schema', None) + self.input_schema_mapping = kwargs.get('input_schema_mapping', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py 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..3ad4d5ed9b64 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Domain(TrackedResource): + """EventGrid Domain. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + :param location: Required. Location of the resource + :type location: str + :param tags: Tags of the resource + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the domain. Possible + values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Canceled', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.eventgrid.models.DomainProvisioningState + :ivar endpoint: Endpoint for the domain. + :vartype endpoint: str + :param input_schema: This determines the format that Event Grid should + expect for incoming events published to the domain. Possible values + include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' + :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema + :param input_schema_mapping: Information about the InputSchemaMapping + which specified the info about mapping event payload. + :type input_schema_mapping: + ~azure.mgmt.eventgrid.models.InputSchemaMapping + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, + 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, + } + + def __init__(self, *, location: str, tags=None, input_schema=None, input_schema_mapping=None, **kwargs) -> None: + super(Domain, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.endpoint = None + self.input_schema = input_schema + self.input_schema_mapping = input_schema_mapping diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py 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..df6ae9d607d4 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.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 .resource import Resource + + +class DomainTopic(Resource): + """Domain Topic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py 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..04e31b7eae80 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_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 .resource_py3 import Resource + + +class DomainTopic(Resource): + """Domain Topic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier of the resource + :vartype id: str + :ivar name: Name of the resource + :vartype name: str + :ivar type: Type of the resource + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py 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 3a265b2304c5..2c766d90cdb4 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,7 +12,7 @@ from enum import Enum -class EventSubscriptionProvisioningState(str, Enum): +class DomainProvisioningState(str, Enum): creating = "Creating" updating = "Updating" @@ -20,17 +20,16 @@ class EventSubscriptionProvisioningState(str, Enum): succeeded = "Succeeded" canceled = "Canceled" failed = "Failed" - awaiting_manual_action = "AwaitingManualAction" -class EventDeliverySchema(str, Enum): +class InputSchema(str, Enum): event_grid_schema = "EventGridSchema" - input_event_schema = "InputEventSchema" + custom_event_schema = "CustomEventSchema" cloud_event_v01_schema = "CloudEventV01Schema" -class TopicProvisioningState(str, Enum): +class EventSubscriptionProvisioningState(str, Enum): creating = "Creating" updating = "Updating" @@ -38,13 +37,24 @@ class TopicProvisioningState(str, Enum): succeeded = "Succeeded" canceled = "Canceled" failed = "Failed" + awaiting_manual_action = "AwaitingManualAction" -class InputSchema(str, Enum): +class EventDeliverySchema(str, Enum): event_grid_schema = "EventGridSchema" - custom_event_schema = "CustomEventSchema" cloud_event_v01_schema = "CloudEventV01Schema" + custom_input_schema = "CustomInputSchema" + + +class TopicProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + deleting = "Deleting" + succeeded = "Succeeded" + canceled = "Canceled" + failed = "Failed" class ResourceRegionType(str, Enum): 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 6e7fb83355d4..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,10 +39,11 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "InputEventSchema" . + '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 @@ -71,6 +72,7 @@ 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'}, @@ -83,6 +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.event_delivery_schema = kwargs.get('event_delivery_schema', "InputEventSchema") + self.expiration_time_utc = kwargs.get('expiration_time_utc', None) + self.event_delivery_schema = kwargs.get('event_delivery_schema', None) self.retry_policy = kwargs.get('retry_policy', None) self.dead_letter_destination = kwargs.get('dead_letter_destination', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py index 0b2466b19281..df5e5050e604 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py @@ -33,6 +33,8 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool + :param advanced_filters: A list of advanced filters. + :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -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..16c946cd2363 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py @@ -33,6 +33,8 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool + :param advanced_filters: A list of advanced filters. + :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -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 59cb87e4c9f5..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,10 +39,11 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema'. Default value: - "InputEventSchema" . + '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 @@ -71,18 +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, event_delivery_schema="InputEventSchema", 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 07b295319084..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,9 +23,12 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema' + '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 @@ -41,6 +44,7 @@ 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'}, @@ -51,6 +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 f88ad534e83f..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,9 +23,12 @@ 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', - 'InputEventSchema', 'CloudEventV01Schema' + '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 @@ -41,16 +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, event_delivery_schema=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/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..d613515b9528 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberGreaterThanAdvancedFilter(AdvancedFilter): + """NumberGreaterThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberGreaterThanAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py new file mode 100644 index 000000000000..29a878af007f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberGreaterThanAdvancedFilter(AdvancedFilter): + """NumberGreaterThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberGreaterThanAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py new file mode 100644 index 000000000000..47e4bf38b609 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberGreaterThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py new file mode 100644 index 000000000000..07597f50cf46 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberGreaterThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py new file mode 100644 index 000000000000..ab5211aa1247 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberInAdvancedFilter(AdvancedFilter): + """NumberIn filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, **kwargs): + super(NumberInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py new file mode 100644 index 000000000000..5358d30a87df --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberInAdvancedFilter(AdvancedFilter): + """NumberIn filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(NumberInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py new file mode 100644 index 000000000000..f2f24e157e32 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberLessThanAdvancedFilter(AdvancedFilter): + """NumberLessThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberLessThanAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py new file mode 100644 index 000000000000..f1e2d64c692f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberLessThanAdvancedFilter(AdvancedFilter): + """NumberLessThan Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberLessThanAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py new file mode 100644 index 000000000000..fc563b5f1480 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberLessThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py new file mode 100644 index 000000000000..d0cb3a127cec --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): + """NumberLessThanOrEquals Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The filter value + :type value: float + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: + super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) + self.value = value + self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py new file mode 100644 index 000000000000..790f5f48697f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class NumberNotInAdvancedFilter(AdvancedFilter): + """NumberNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, **kwargs): + super(NumberNotInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py new file mode 100644 index 000000000000..8fa0af24af0e --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class NumberNotInAdvancedFilter(AdvancedFilter): + """NumberNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[float] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[float]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(NumberNotInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/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..a6d1f91f8eaa --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringBeginsWithAdvancedFilter(AdvancedFilter): + """StringBeginsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringBeginsWithAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py new file mode 100644 index 000000000000..4b33c1bf1bd1 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringBeginsWithAdvancedFilter(AdvancedFilter): + """StringBeginsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringBeginsWithAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py new file mode 100644 index 000000000000..04667aeeb31d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringContainsAdvancedFilter(AdvancedFilter): + """StringContains Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringContainsAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py new file mode 100644 index 000000000000..53b7a530d9ed --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringContainsAdvancedFilter(AdvancedFilter): + """StringContains Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringContainsAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py new file mode 100644 index 000000000000..8413d1ae330d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringEndsWithAdvancedFilter(AdvancedFilter): + """StringEndsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringEndsWithAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py new file mode 100644 index 000000000000..47b469c98e79 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringEndsWithAdvancedFilter(AdvancedFilter): + """StringEndsWith Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringEndsWithAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py new file mode 100644 index 000000000000..52b480d90433 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringInAdvancedFilter(AdvancedFilter): + """StringIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py new file mode 100644 index 000000000000..1da9dc34ac6b --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringInAdvancedFilter(AdvancedFilter): + """StringIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py new file mode 100644 index 000000000000..0621f0f9dfc4 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.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 .advanced_filter import AdvancedFilter + + +class StringNotInAdvancedFilter(AdvancedFilter): + """StringNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(StringNotInAdvancedFilter, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py new file mode 100644 index 000000000000..d115f4c12266 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_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 .advanced_filter_py3 import AdvancedFilter + + +class StringNotInAdvancedFilter(AdvancedFilter): + """StringNotIn Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The filter key. Represents an event property with upto two + levels of nesting. + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param values: The set of filter values + :type values: list[str] + """ + + _validation = { + 'operator_type': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'operator_type': {'key': 'operatorType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, key: str=None, values=None, **kwargs) -> None: + super(StringNotInAdvancedFilter, self).__init__(key=key, **kwargs) + self.values = values + self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/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..8c89845989e1 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py @@ -0,0 +1,179 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DomainTopicsOperations(object): + """DomainTopicsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-15-preview" + + self.config = config + + def get( + self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): + """Get a domain topic. + + Get properties of a domain topic. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param topic_name: Name of the topic + :type topic_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainTopic or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.DomainTopic or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'topicName': self._serialize.url("topic_name", topic_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DomainTopic', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}'} + + def list_by_domain( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """List domain topics. + + List all the topics in a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Domain name. + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DomainTopic + :rtype: + ~azure.mgmt.eventgrid.models.DomainTopicPaged[~azure.mgmt.eventgrid.models.DomainTopic] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_domain.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py new file mode 100644 index 000000000000..f7f9bd42690d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py @@ -0,0 +1,669 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DomainsOperations(object): + """DomainsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-15-preview" + + self.config = config + + def get( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """Get a domain. + + Get properties of a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.Domain or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_info, 'Domain') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a domain. + + Asynchronously creates a new domain with the specified parameters. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param domain_info: Domain information + :type domain_info: ~azure.mgmt.eventgrid.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain_info=domain_info, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + + def _delete_initial( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a domain. + + Delete existing domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + + def _update_initial( + self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, **operation_config): + domain_update_parameters = models.DomainUpdateParameters(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(domain_update_parameters, 'DomainUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a domain. + + Asynchronously updates a domain with the specified parameters. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param tags: Tags of the domains resource + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Domain or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """List domains under an Azure subscription. + + List all the domains under an Azure subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List domains under a resource group. + + List all the domains under a resource group. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains'} + + def list_shared_access_keys( + self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): + """List keys for a domain. + + List the two keys used to publish to a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainSharedAccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_shared_access_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DomainSharedAccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys'} + + def regenerate_key( + self, resource_group_name, domain_name, key_name, custom_headers=None, raw=False, **operation_config): + """Regenerate key for a domain. + + Regenerate a shared access key for a domain. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the domain + :type domain_name: str + :param key_name: Key name to regenerate key1 or key2 + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DomainSharedAccessKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_key_request = models.DomainRegenerateKeyRequest(key_name=key_name) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_key_request, 'DomainRegenerateKeyRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DomainSharedAccessKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py index 413ca68989b7..e0babad2bffc 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py @@ -25,7 +25,7 @@ class EventSubscriptionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-preview" self.config = config @@ -1162,3 +1162,80 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions'} + + def list_by_domain_topic( + self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): + """List all event subscriptions for a specific domain topic. + + List all event subscriptions that have been created for a specific + domain topic. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param domain_name: Name of the top level domain + :type domain_name: str + :param topic_name: Name of the domain topic + :type topic_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EventSubscription + :rtype: + ~azure.mgmt.eventgrid.models.EventSubscriptionPaged[~azure.mgmt.eventgrid.models.EventSubscription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_domain_topic.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str'), + 'topicName': self._serialize.url("topic_name", topic_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_domain_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py index dc9600e337bb..d7e84f37b171 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-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 ab63c82604f6..a1bb6fb80e13 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py @@ -23,7 +23,7 @@ class TopicTypesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-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 9b739c76d128..7c58f7ef1a5a 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py @@ -25,7 +25,7 @@ class TopicsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-05-01-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-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 = "2018-05-01-preview" + self.api_version = "2018-09-15-preview" self.config = config diff --git a/azure-mgmt-eventgrid/azure_bdist_wheel.py b/azure-mgmt-eventgrid/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-eventgrid/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/azure-mgmt-eventgrid/setup.cfg b/azure-mgmt-eventgrid/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-eventgrid/setup.cfg +++ b/azure-mgmt-eventgrid/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-eventgrid/setup.py b/azure-mgmt-eventgrid/setup.py index 28926d1c46e4..7eab3505b4b0 100644 --- a/azure-mgmt-eventgrid/setup.py +++ b/azure-mgmt-eventgrid/setup.py @@ -10,12 +10,6 @@ import os.path from io import open from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-eventgrid" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } ) From a051c385198d22023a87faf5470a14e064760680 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Thu, 18 Oct 2018 19:54:43 +0000 Subject: [PATCH 07/10] Packaging update of azure-mgmt-eventgrid --- azure-mgmt-eventgrid/MANIFEST.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-mgmt-eventgrid/MANIFEST.in b/azure-mgmt-eventgrid/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-eventgrid/MANIFEST.in +++ b/azure-mgmt-eventgrid/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + From dffbf8629120dfacf7defd47d753e780a8fdff50 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Tue, 23 Oct 2018 22:11:00 +0000 Subject: [PATCH 08/10] Packaging update of azure-mgmt-eventgrid --- azure-mgmt-eventgrid/MANIFEST.in | 1 + azure-mgmt-eventgrid/README.rst | 2 +- azure-mgmt-eventgrid/setup.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-eventgrid/MANIFEST.in b/azure-mgmt-eventgrid/MANIFEST.in index ac87972df424..6ceb27f7a96e 100644 --- a/azure-mgmt-eventgrid/MANIFEST.in +++ b/azure-mgmt-eventgrid/MANIFEST.in @@ -1,3 +1,4 @@ include *.rst include azure/__init__.py include azure/mgmt/__init__.py + diff --git a/azure-mgmt-eventgrid/README.rst b/azure-mgmt-eventgrid/README.rst index 9aa76adf8446..7792414c6dda 100644 --- a/azure-mgmt-eventgrid/README.rst +++ b/azure-mgmt-eventgrid/README.rst @@ -1,7 +1,7 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure MyService Management Client Library. +This is the Microsoft Azure EventGrid Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). diff --git a/azure-mgmt-eventgrid/setup.py b/azure-mgmt-eventgrid/setup.py index 7eab3505b4b0..8fd5d1b00bde 100644 --- a/azure-mgmt-eventgrid/setup.py +++ b/azure-mgmt-eventgrid/setup.py @@ -13,7 +13,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-eventgrid" -PACKAGE_PPRINT_NAME = "MyService Management" +PACKAGE_PPRINT_NAME = "EventGrid Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') From 5b657b9d524cefa2c1cf8bcfcee2f795847e7a29 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 24 Oct 2018 14:05:22 -0700 Subject: [PATCH 09/10] EventGrid 2.0.0rc2 --- azure-mgmt-eventgrid/HISTORY.rst | 20 ++++++++++++++++--- .../azure/mgmt/eventgrid/version.py | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/azure-mgmt-eventgrid/HISTORY.rst b/azure-mgmt-eventgrid/HISTORY.rst index aa923796a13c..192e5dcec83d 100644 --- a/azure-mgmt-eventgrid/HISTORY.rst +++ b/azure-mgmt-eventgrid/HISTORY.rst @@ -3,6 +3,20 @@ Release History =============== +2.0.0rc2 (2018-10-24) ++++++++++++++++++++++ + +**Features** + +- Model EventSubscriptionFilter has a new parameter advanced_filters +- Model EventSubscriptionUpdateParameters has a new parameter expiration_time_utc +- Model EventSubscription has a new parameter expiration_time_utc +- Added operation EventSubscriptionsOperations.list_by_domain_topic +- Added operation group DomainTopicsOperations +- Added operation group DomainsOperations + +Internal API version is 2018-09-15-preview + 2.0.0rc1 (2018-05-04) +++++++++++++++++++++ @@ -14,9 +28,9 @@ Release History - delivering events to Azure Storage queue and Azure hybrid connections - deadlettering - retry policies -- manual subscription validation handshake validation. +- manual subscription validation handshake validation. -Internal API version is 2018-05-01-preview +Internal API version is 2018-05-01-preview 1.0.0 (2018-04-26) ++++++++++++++++++ @@ -39,7 +53,7 @@ This version uses a next-generation code generator that *might* introduce breaki - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. - - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, the response of the initial call will be returned without polling. diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py index a39916c162ce..fa6594091164 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 = "1.0.0" +VERSION = "2.0.0rc2" From 2c527e4a50491df98c2e0d204f6a429eea6a47d2 Mon Sep 17 00:00:00 2001 From: "J. Kalyana Sundaram" Date: Thu, 25 Oct 2018 21:29:53 -0700 Subject: [PATCH 10/10] Added a new test + re-recorded all tests. --- ...grid.test_domains_and_advanced_filter.yaml | 257 ++++++++++++++++++ ..._input_mappings_and_queue_destination.yaml | 108 ++++---- ...azure_mgmt_eventgrid.test_topic_types.yaml | 75 +++++ ...azure_mgmt_eventgrid.test_user_topics.yaml | 114 ++++---- .../tests/test_azure_mgmt_eventgrid.py | 39 ++- 5 files changed, 479 insertions(+), 114 deletions(-) create mode 100644 azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_domains_and_advanced_filter.yaml create mode 100644 azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_topic_types.yaml diff --git a/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_domains_and_advanced_filter.yaml b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_domains_and_advanced_filter.yaml new file mode 100644 index 000000000000..2a35cd4baf8e --- /dev/null +++ b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_domains_and_advanced_filter.yaml @@ -0,0 +1,257 @@ +interactions: +- request: + body: '{"location": "westcentralus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['29'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1?api-version=2018-09-15-preview + response: + body: {string: '{"properties":{"provisioningState":"Creating","endpoint":null},"location":"westcentralus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1","name":"kalspythond1","type":"Microsoft.EventGrid/domains"}'} + headers: + azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/28CE187F-D697-4B3A-AE05-1D20D028AA1D?api-version=2018-09-15-preview'] + cache-control: [no-cache] + content-length: ['353'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 26 Oct 2018 04:24:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/28CE187F-D697-4B3A-AE05-1D20D028AA1D?api-version=2018-09-15-preview + response: + body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/28CE187F-D697-4B3A-AE05-1D20D028AA1D?api-version=2018-09-15-preview","name":"28ce187f-d697-4b3a-ae05-1d20d028aa1d","status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 26 Oct 2018 04:24:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1?api-version=2018-09-15-preview + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://kalspythond1.westcentralus-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema"},"location":"westcentralus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1","name":"kalspythond1","type":"Microsoft.EventGrid/domains"}'} + headers: + cache-control: [no-cache] + content-length: ['451'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 26 Oct 2018 04:24:37 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"destination": {"endpointType": "WebHook", "properties": + {"endpointUrl": "https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1?code=D5/lX4xgFOvJrgvgZsjhMpg9h/eC3XVdQzGuDvwQuGmrDUfxFNeyiQ=="}}, + "filter": {"isSubjectCaseSensitive": false, "advancedFilters": [{"key": "data.key1", + "operatorType": "NumberLessThan", "value": 4.0}]}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['351'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-09-15-preview + response: + body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/microsoft.eventgrid/domains/kalspythond1","provisioningState":"Creating","destination":{"properties":{"endpointUrl":null,"endpointBaseUrl":"https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1"},"endpointType":"WebHook"},"filter":{"advancedFilters":[{"value":4.0,"operatorType":"NumberLessThan","key":"data.key1"}]},"labels":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2","name":"kalspythonEventSubscription2","type":"Microsoft.EventGrid/eventSubscriptions"}'} + headers: + azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/5187EA1A-FB80-4D24-B389-1E7333B64028?api-version=2018-09-15-preview'] + cache-control: [no-cache] + content-length: ['861'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 26 Oct 2018 04:24:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/5187EA1A-FB80-4D24-B389-1E7333B64028?api-version=2018-09-15-preview + response: + body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/5187EA1A-FB80-4D24-B389-1E7333B64028?api-version=2018-09-15-preview","name":"5187ea1a-fb80-4d24-b389-1e7333b64028","status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 26 Oct 2018 04:24:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-09-15-preview + response: + body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/microsoft.eventgrid/domains/kalspythond1","provisioningState":"Succeeded","destination":{"properties":{"endpointUrl":null,"endpointBaseUrl":"https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1"},"endpointType":"WebHook"},"filter":{"subjectBeginsWith":"","subjectEndsWith":"","includedEventTypes":["All"],"advancedFilters":[{"value":4.0,"operatorType":"NumberLessThan","key":"data.key1"}]},"labels":null,"eventDeliverySchema":"EventGridSchema","retryPolicy":{"maxDeliveryAttempts":30,"eventTimeToLiveInMinutes":1440}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2","name":"kalspythonEventSubscription2","type":"Microsoft.EventGrid/eventSubscriptions"}'} + headers: + cache-control: [no-cache] + content-length: ['1048'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 26 Oct 2018 04:24:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-09-15-preview + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 26 Oct 2018 04:24:50 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/6E04D057-93FA-4CBA-8872-40452786DDC3?api-version=2018-09-15-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/6E04D057-93FA-4CBA-8872-40452786DDC3?api-version=2018-09-15-preview + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 26 Oct 2018 04:25:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_domains_and_advanced_filterc2ee17c6/providers/Microsoft.EventGrid/domains/kalspythond1?api-version=2018-09-15-preview + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 26 Oct 2018 04:25:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/E6BD5C77-985A-43E3-AD01-3B0FDB9824E2?api-version=2018-09-15-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/E6BD5C77-985A-43E3-AD01-3B0FDB9824E2?api-version=2018-09-15-preview + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 26 Oct 2018 04:25:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +version: 1 diff --git a/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_input_mappings_and_queue_destination.yaml b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_input_mappings_and_queue_destination.yaml index a03d6812aa27..297e810bc55f 100644 --- a/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_input_mappings_and_queue_destination.yaml +++ b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_input_mappings_and_queue_destination.yaml @@ -7,25 +7,25 @@ interactions: Connection: [keep-alive] Content-Length: ['83'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2?api-version=2018-09-15-preview response: body: {string: '{"properties":{"provisioningState":"Creating","endpoint":null,"inputSchema":"CloudEventV01Schema"},"location":"westcentralus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2","name":"kalspython2","type":"Microsoft.EventGrid/topics"}'} headers: - azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/655A788C-9FF7-4B3E-AA76-10C824168F89?api-version=2018-05-01-preview'] + azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/4AF3912A-9B5A-44FE-87EE-4986D976F16E?api-version=2018-09-15-preview'] cache-control: [no-cache] content-length: ['394'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:35:36 GMT'] + date: ['Fri, 26 Oct 2018 04:25:17 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -33,17 +33,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/655A788C-9FF7-4B3E-AA76-10C824168F89?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/4AF3912A-9B5A-44FE-87EE-4986D976F16E?api-version=2018-09-15-preview response: - body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/655A788C-9FF7-4B3E-AA76-10C824168F89?api-version=2018-05-01-preview","name":"655a788c-9ff7-4b3e-aa76-10c824168f89","status":"Succeeded"}'} + body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/4AF3912A-9B5A-44FE-87EE-4986D976F16E?api-version=2018-09-15-preview","name":"4af3912a-9b5a-44fe-87ee-4986d976f16e","status":"Succeeded"}'} headers: cache-control: [no-cache] content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:35:47 GMT'] + date: ['Fri, 26 Oct 2018 04:25:27 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -58,17 +58,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2?api-version=2018-09-15-preview response: body: {string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://kalspython2.westcentralus-1.eventgrid.azure.net/api/events","inputSchema":"CloudEventV01Schema"},"location":"westcentralus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2","name":"kalspython2","type":"Microsoft.EventGrid/topics"}'} headers: cache-control: [no-cache] content-length: ['459'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:35:47 GMT'] + date: ['Fri, 26 Oct 2018 04:25:28 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -78,38 +78,38 @@ interactions: x-content-type-options: [nosniff] status: {code: 200, message: OK} - request: - body: 'b''b\''b\\\''{"properties": {"destination": {"endpointType": "StorageQueue", - "properties": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.Storage/storageAccounts/kalsdemo", + body: 'b''b\''b\\\''b\\\\\\\''{"properties": {"destination": {"endpointType": + "StorageQueue", "properties": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.Storage/storageAccounts/kalsdemo", "queueName": "kalsdemoqueue"}}, "filter": {"isSubjectCaseSensitive": false}, "eventDeliverySchema": "CloudEventV01Schema", "retryPolicy": {"maxDeliveryAttempts": 10, "eventTimeToLiveInMinutes": 5}, "deadLetterDestination": {"endpointType": "StorageBlob", "properties": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.Storage/storageAccounts/kalsdemo", - "blobContainerName": "dlq"}}}}\\\''\''''' + "blobContainerName": "dlq"}}}}\\\\\\\''\\\''\''''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['671'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3?api-version=2018-09-15-preview response: body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/microsoft.eventgrid/topics/kalspython2","provisioningState":"Creating","destination":{"properties":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.Storage/storageAccounts/kalsdemo","queueName":"kalsdemoqueue"},"endpointType":"StorageQueue"},"filter":{},"labels":null,"eventDeliverySchema":"CloudEventV01Schema","retryPolicy":{"maxDeliveryAttempts":10,"eventTimeToLiveInMinutes":5},"deadLetterDestination":{"properties":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.Storage/storageAccounts/kalsdemo","blobContainerName":"dlq"},"endpointType":"StorageBlob"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3","name":"kalspythonEventSubscription3","type":"Microsoft.EventGrid/eventSubscriptions"}'} headers: - azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/B4124FB7-4046-4140-A4B0-3604CF6C97E9?api-version=2018-05-01-preview'] + azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/C8F43E26-38C3-4361-AEE8-DAE56CF81DDF?api-version=2018-09-15-preview'] cache-control: [no-cache] content-length: ['1225'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:35:49 GMT'] + date: ['Fri, 26 Oct 2018 04:25:30 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -117,17 +117,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/B4124FB7-4046-4140-A4B0-3604CF6C97E9?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/C8F43E26-38C3-4361-AEE8-DAE56CF81DDF?api-version=2018-09-15-preview response: - body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/B4124FB7-4046-4140-A4B0-3604CF6C97E9?api-version=2018-05-01-preview","name":"b4124fb7-4046-4140-a4b0-3604cf6c97e9","status":"Succeeded"}'} + body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/C8F43E26-38C3-4361-AEE8-DAE56CF81DDF?api-version=2018-09-15-preview","name":"c8f43e26-38c3-4361-aee8-dae56cf81ddf","status":"Succeeded"}'} headers: cache-control: [no-cache] content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:00 GMT'] + date: ['Fri, 26 Oct 2018 04:25:40 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -142,17 +142,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3?api-version=2018-09-15-preview response: body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/microsoft.eventgrid/topics/kalspython2","provisioningState":"Succeeded","destination":{"properties":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.Storage/storageAccounts/kalsdemo","queueName":"kalsdemoqueue"},"endpointType":"StorageQueue"},"filter":{"subjectBeginsWith":"","subjectEndsWith":"","includedEventTypes":["All"]},"labels":null,"eventDeliverySchema":"CloudEventV01Schema","retryPolicy":{"maxDeliveryAttempts":10,"eventTimeToLiveInMinutes":5},"deadLetterDestination":{"properties":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kalstest/providers/Microsoft.Storage/storageAccounts/kalsdemo","blobContainerName":"dlq"},"endpointType":"StorageBlob"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3","name":"kalspythonEventSubscription3","type":"Microsoft.EventGrid/eventSubscriptions"}'} headers: cache-control: [no-cache] content-length: ['1298'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:00 GMT'] + date: ['Fri, 26 Oct 2018 04:25:40 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -168,25 +168,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription3?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:36:01 GMT'] + date: ['Fri, 26 Oct 2018 04:25:42 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/548CBC66-CB7C-425A-8FB0-B38473795946?api-version=2018-05-01-preview'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/FEBF399C-2DE2-4E40-AC18-3FA6D1470C05?api-version=2018-09-15-preview'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] status: {code: 202, message: Accepted} - request: body: null @@ -194,16 +193,16 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/548CBC66-CB7C-425A-8FB0-B38473795946?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/FEBF399C-2DE2-4E40-AC18-3FA6D1470C05?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:36:11 GMT'] + date: ['Fri, 26 Oct 2018 04:25:52 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -217,25 +216,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_input_mappings_and_queue_destinationb3481bd4/providers/Microsoft.EventGrid/topics/kalspython2?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:36:12 GMT'] + date: ['Fri, 26 Oct 2018 04:25:53 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/B5873B89-5726-4F57-B730-A16150F16810?api-version=2018-05-01-preview'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/39D6B2D4-F89C-4564-9487-0AF3C33D55D2?api-version=2018-09-15-preview'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] status: {code: 202, message: Accepted} - request: body: null @@ -243,16 +241,16 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/B5873B89-5726-4F57-B730-A16150F16810?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/39D6B2D4-F89C-4564-9487-0AF3C33D55D2?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:36:24 GMT'] + date: ['Fri, 26 Oct 2018 04:26:03 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] diff --git a/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_topic_types.yaml b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_topic_types.yaml new file mode 100644 index 000000000000..51fc06e4f4bb --- /dev/null +++ b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_topic_types.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/providers/Microsoft.EventGrid/topicTypes?api-version=2018-09-15-preview + response: + body: {string: '{"value":[{"properties":{"provider":"Microsoft.Eventhub","displayName":"Event + Hubs Namespaces","description":"Microsoft Event Hubs service events.","resourceRegionType":"RegionalResource","provisioningState":"Succeeded","supportedLocations":["West + US 2","West Central US","East US 2 EUAP","East US","West US","Central US","East + US 2","West Europe","North Europe","Southeast Asia","East Asia","Japan East","Japan + West","Australia East","Australia Southeast","North Central US","South Central + US","Canada Central","Canada East","Central India","South India","France Central","UK + West","Korea Central","Korea South","Central US EUAP","West India","Brazil + South","UK South","Australia Central","Australia Central 2","France South"]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.Eventhub.Namespaces","name":"Microsoft.Eventhub.Namespaces","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.Storage","displayName":"Storage + Accounts","description":"Microsoft Storage service events.","resourceRegionType":"RegionalResource","provisioningState":"Succeeded","supportedLocations":["West + US 2","West Central US","East US 2 EUAP","East US","West US","Central US","East + US 2","West Europe","North Europe","Southeast Asia","East Asia","Japan East","Japan + West","Australia East","Australia Southeast","North Central US","South Central + US","Canada Central","Canada East","Central India","South India","France Central","UK + West","Korea Central","Korea South","Central US EUAP","West India","Brazil + South","UK South","Australia Central","Australia Central 2","France South"]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.Storage.StorageAccounts","name":"Microsoft.Storage.StorageAccounts","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.Resources","displayName":"Azure + Subscriptions","description":"Resource management events under an Azure subscription","resourceRegionType":"GlobalResource","provisioningState":"Succeeded","supportedLocations":[]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.Resources.Subscriptions","name":"Microsoft.Resources.Subscriptions","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.Resources","displayName":"Resource + Groups","description":"Resource management events under a resource group.","resourceRegionType":"GlobalResource","provisioningState":"Succeeded","supportedLocations":[]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.Resources.ResourceGroups","name":"Microsoft.Resources.ResourceGroups","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.Devices","displayName":"Azure + IoT Hub Accounts","description":"Azure IoT Hub service events","resourceRegionType":"RegionalResource","provisioningState":"Succeeded","supportedLocations":["West + US 2","West Central US","East US","West US","Central US","East US 2","West + Europe","North Europe","Southeast Asia","East Asia","Japan East","Japan West","Australia + East","Australia Southeast","Canada Central","Canada East","Central India","South + India","UK West","Central US EUAP","West India","Brazil South","UK South","South + Central US","Korea Central","Korea South"]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.Devices.IoTHubs","name":"Microsoft.Devices.IoTHubs","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.EventGrid","displayName":"Event + Grid Topics","description":"Custom events via Event Grid Topics","resourceRegionType":"RegionalResource","provisioningState":"Succeeded","supportedLocations":["West + US 2","West Central US","East US 2 EUAP","East US","West US","Central US","East + US 2","West Europe","North Europe","Southeast Asia","East Asia","Japan East","Japan + West","Australia East","Australia Southeast","North Central US","South Central + US","Canada Central","Canada East","Central India","South India","France Central","UK + West","Korea Central","Korea South","Central US EUAP","West India","Brazil + South","UK South","Australia Central","Australia Central 2","France South"]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.EventGrid.Topics","name":"Microsoft.EventGrid.Topics","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.ServiceBus","displayName":"Service + Bus Namespaces","description":"Service Bus events","resourceRegionType":"RegionalResource","provisioningState":"Succeeded","supportedLocations":["West + US 2","West Central US","East US 2 EUAP","East US","West US","Central US","East + US 2","West Europe","North Europe","Southeast Asia","East Asia","Japan East","Japan + West","Australia East","Australia Southeast","North Central US","South Central + US","Canada Central","Canada East","Central India","South India","France Central","UK + West","Korea Central","Korea South","Central US EUAP","West India","Brazil + South","UK South"]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.ServiceBus.Namespaces","name":"Microsoft.ServiceBus.Namespaces","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.ContainerRegistry","displayName":"Azure + Container Registry","description":"Azure Container Registry service events","resourceRegionType":"RegionalResource","provisioningState":"Succeeded","supportedLocations":["West + US 2","West Central US","East US 2 EUAP","East US","West US","Central US","East + US 2","West Europe","North Europe","Southeast Asia","East Asia","South Central + US","North Central US","Central US EUAP","Brazil South","Canada East","Canada + Central","UK South","UK West","Australia East","Australia Southeast","Central + India","Japan East","Japan West","South India"]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.ContainerRegistry.Registries","name":"Microsoft.ContainerRegistry.Registries","type":"Microsoft.EventGrid/topicTypes"},{"properties":{"provider":"Microsoft.Media","displayName":"Microsoft + Azure Media Services","description":"Microsoft Azure Media Services events","resourceRegionType":"RegionalResource","provisioningState":"Succeeded","supportedLocations":["Australia + East","Australia Southeast","Brazil South","Canada Central","Canada East","Central + India","Central US","Central US EUAP","East Asia","East US","East US 2","Japan + East","Japan West","North Europe","South Central US","South India","Southeast + Asia","West Central US","West Europe","West India","West US","West US 2"]},"id":"providers/Microsoft.EventGrid/topicTypes/Microsoft.Media.MediaServices","name":"Microsoft.Media.MediaServices","type":"Microsoft.EventGrid/topicTypes"}]}'} + headers: + cache-control: [no-cache] + content-length: ['6533'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 26 Oct 2018 04:26:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +version: 1 diff --git a/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_user_topics.yaml b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_user_topics.yaml index dae1e62eaa76..76eff4681f0f 100644 --- a/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_user_topics.yaml +++ b/azure-mgmt-eventgrid/tests/recordings/test_azure_mgmt_eventgrid.test_user_topics.yaml @@ -7,25 +7,25 @@ interactions: Connection: [keep-alive] Content-Length: ['79'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1?api-version=2018-09-15-preview response: body: {string: '{"properties":{"provisioningState":"Creating","endpoint":null,"inputSchema":"EventGridSchema"},"location":"westcentralus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1","name":"kalspython1","type":"Microsoft.EventGrid/topics"}'} headers: - azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/44C4CF5C-8A0B-409F-A2A2-E6FA165CDE36?api-version=2018-05-01-preview'] + azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/3C72AC27-D137-47A3-B0A6-96A0D4F0CD10?api-version=2018-09-15-preview'] cache-control: [no-cache] content-length: ['365'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:29 GMT'] + date: ['Fri, 26 Oct 2018 04:26:11 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -33,17 +33,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/44C4CF5C-8A0B-409F-A2A2-E6FA165CDE36?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/3C72AC27-D137-47A3-B0A6-96A0D4F0CD10?api-version=2018-09-15-preview response: - body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/44C4CF5C-8A0B-409F-A2A2-E6FA165CDE36?api-version=2018-05-01-preview","name":"44c4cf5c-8a0b-409f-a2a2-e6fa165cde36","status":"Succeeded"}'} + body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/3C72AC27-D137-47A3-B0A6-96A0D4F0CD10?api-version=2018-09-15-preview","name":"3c72ac27-d137-47a3-b0a6-96a0d4f0cd10","status":"Succeeded"}'} headers: cache-control: [no-cache] content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:40 GMT'] + date: ['Fri, 26 Oct 2018 04:26:22 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -58,17 +58,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1?api-version=2018-09-15-preview response: body: {string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://kalspython1.westcentralus-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema"},"location":"westcentralus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1","name":"kalspython1","type":"Microsoft.EventGrid/topics"}'} headers: cache-control: [no-cache] content-length: ['430'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:41 GMT'] + date: ['Fri, 26 Oct 2018 04:26:22 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -79,27 +79,27 @@ interactions: status: {code: 200, message: OK} - request: body: '{"properties": {"destination": {"endpointType": "WebHook", "properties": - {"endpointUrl": "https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1?code=69AbujfvYn77Ccf5OySDcTk9CYM1b9Ua2lO37ayoWb97fGRWELGbnA=="}}, - "filter": {"isSubjectCaseSensitive": false}, "eventDeliverySchema": "EventGridSchema"}}' + {"endpointUrl": "https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1?code=D5/lX4xgFOvJrgvgZsjhMpg9h/eC3XVdQzGuDvwQuGmrDUfxFNeyiQ=="}}, + "filter": {"isSubjectCaseSensitive": false}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['302'] + Content-Length: ['260'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-09-15-preview response: - body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/microsoft.eventgrid/topics/kalspython1","provisioningState":"Creating","destination":{"properties":{"endpointUrl":null,"endpointBaseUrl":"https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1"},"endpointType":"WebHook"},"filter":{},"labels":null,"eventDeliverySchema":"EventGridSchema"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2","name":"kalspythonEventSubscription2","type":"Microsoft.EventGrid/eventSubscriptions"}'} + body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/microsoft.eventgrid/topics/kalspython1","provisioningState":"Creating","destination":{"properties":{"endpointUrl":null,"endpointBaseUrl":"https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1"},"endpointType":"WebHook"},"filter":{},"labels":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2","name":"kalspythonEventSubscription2","type":"Microsoft.EventGrid/eventSubscriptions"}'} headers: - azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/C6641190-B450-41B4-B60D-40A9126BF707?api-version=2018-05-01-preview'] + azure-asyncoperation: ['https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/4DD9ECAE-3F54-49BA-AB3A-487A4D35D51F?api-version=2018-09-15-preview'] cache-control: [no-cache] - content-length: ['782'] + content-length: ['742'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:41 GMT'] + date: ['Fri, 26 Oct 2018 04:26:23 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -113,17 +113,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/C6641190-B450-41B4-B60D-40A9126BF707?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/4DD9ECAE-3F54-49BA-AB3A-487A4D35D51F?api-version=2018-09-15-preview response: - body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/C6641190-B450-41B4-B60D-40A9126BF707?api-version=2018-05-01-preview","name":"c6641190-b450-41b4-b60d-40a9126bf707","status":"Succeeded"}'} + body: {string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationsStatus/4DD9ECAE-3F54-49BA-AB3A-487A4D35D51F?api-version=2018-09-15-preview","name":"4dd9ecae-3f54-49ba-ab3a-487a4d35d51f","status":"Succeeded"}'} headers: cache-control: [no-cache] content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:52 GMT'] + date: ['Fri, 26 Oct 2018 04:26:34 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -138,17 +138,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-09-15-preview response: - body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/microsoft.eventgrid/topics/kalspython1","provisioningState":"Succeeded","destination":{"properties":{"endpointUrl":null,"endpointBaseUrl":"https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1"},"endpointType":"WebHook"},"filter":{"subjectBeginsWith":"","subjectEndsWith":"","includedEventTypes":["All"]},"labels":null,"eventDeliverySchema":"EventGridSchema"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2","name":"kalspythonEventSubscription2","type":"Microsoft.EventGrid/eventSubscriptions"}'} + body: {string: '{"properties":{"topic":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/microsoft.eventgrid/topics/kalspython1","provisioningState":"Succeeded","destination":{"properties":{"endpointUrl":null,"endpointBaseUrl":"https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1"},"endpointType":"WebHook"},"filter":{"subjectBeginsWith":"","subjectEndsWith":"","includedEventTypes":["All"]},"labels":null,"eventDeliverySchema":"EventGridSchema","retryPolicy":{"maxDeliveryAttempts":30,"eventTimeToLiveInMinutes":1440}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2","name":"kalspythonEventSubscription2","type":"Microsoft.EventGrid/eventSubscriptions"}'} headers: cache-control: [no-cache] - content-length: ['855'] + content-length: ['928'] content-type: [application/json; charset=utf-8] - date: ['Wed, 02 May 2018 05:36:53 GMT'] + date: ['Fri, 26 Oct 2018 04:26:35 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -164,25 +164,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1/providers/Microsoft.EventGrid/eventSubscriptions/kalspythonEventSubscription2?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:36:54 GMT'] + date: ['Fri, 26 Oct 2018 04:26:36 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/5D0C64CC-A970-49B4-BADD-67A8ECF7FD39?api-version=2018-05-01-preview'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/84CA43BE-CE79-4CA1-B64E-D075BD4546F5?api-version=2018-09-15-preview'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] status: {code: 202, message: Accepted} - request: body: null @@ -190,16 +189,16 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/5D0C64CC-A970-49B4-BADD-67A8ECF7FD39?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/84CA43BE-CE79-4CA1-B64E-D075BD4546F5?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:37:04 GMT'] + date: ['Fri, 26 Oct 2018 04:26:46 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -213,25 +212,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_mgmt_eventgrid_test_user_topics7929117f/providers/Microsoft.EventGrid/topics/kalspython1?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:37:05 GMT'] + date: ['Fri, 26 Oct 2018 04:26:47 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/31508444-2625-4E19-9879-56C52082E701?api-version=2018-05-01-preview'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/F626D398-8172-4AC3-A1BC-CA140F676B55?api-version=2018-09-15-preview'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] status: {code: 202, message: Accepted} - request: body: null @@ -239,16 +237,16 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.29 - msrest_azure/0.4.29 azure-mgmt-eventgrid/2.0.0b1 Azure-SDK-For-Python] + User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) msrest/0.6.1 msrest_azure/0.4.34 + azure-mgmt-eventgrid/2.0.0rc2 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/31508444-2625-4E19-9879-56C52082E701?api-version=2018-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westcentralus/operationResults/F626D398-8172-4AC3-A1BC-CA140F676B55?api-version=2018-09-15-preview response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 02 May 2018 05:37:16 GMT'] + date: ['Fri, 26 Oct 2018 04:26:58 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] diff --git a/azure-mgmt-eventgrid/tests/test_azure_mgmt_eventgrid.py b/azure-mgmt-eventgrid/tests/test_azure_mgmt_eventgrid.py index 5e917d8822d6..988d721618f0 100644 --- a/azure-mgmt-eventgrid/tests/test_azure_mgmt_eventgrid.py +++ b/azure-mgmt-eventgrid/tests/test_azure_mgmt_eventgrid.py @@ -19,6 +19,8 @@ InputSchema, EventDeliverySchema, Topic, + Domain, + NumberLessThanAdvancedFilter, RetryPolicy ) @@ -35,7 +37,6 @@ def process(self, result): pass @ResourceGroupPreparer() - @unittest.skip('Not currently enabled for the 2018-05-01-preview API version') def test_topic_types(self, resource_group, location): # List all topic types for result in self.eventgrid_client.topic_types.list(): @@ -122,6 +123,42 @@ def test_input_mappings_and_queue_destination(self, resource_group, location): self.eventgrid_client.topics.delete(resource_group.name, topic_name).wait() + @ResourceGroupPreparer() + def test_domains_and_advanced_filter(self, resource_group, location): + domain_name = "kalspythond1" + eventsubscription_name = "kalspythonEventSubscription2" + + # Create a new domain and verify that it is created successfully + domain_result_create = self.eventgrid_client.domains.create_or_update(resource_group.name, domain_name, Domain(location="westcentralus")) + domain = domain_result_create.result() + self.assertEqual(domain.name, domain_name) + + # Create a new event subscription to this domain + # Use this for recording mode + # scope = "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/" + resource_group.name + "/providers/Microsoft.EventGrid/domains/" + domain_name + scope = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/" + resource_group.name + "/providers/Microsoft.EventGrid/domains/" + domain_name + + destination = WebHookEventSubscriptionDestination( + # TODO: Before recording tests, replace with a valid Azure function URL + endpoint_url="https://kalsfunc1.azurewebsites.net/api/HttpTriggerCSharp1?code=hidden" + ) + filter = EventSubscriptionFilter() + advanced_filter = NumberLessThanAdvancedFilter(key="data.key1", value=4.0) + filter.advanced_filters = [] + filter.advanced_filters.append(advanced_filter) + + event_subscription_info = EventSubscription(destination=destination, filter=filter) + es_result_create = self.eventgrid_client.event_subscriptions.create_or_update(scope, eventsubscription_name, event_subscription_info) + event_subscription = es_result_create.result() + self.assertEqual(eventsubscription_name, event_subscription.name) + + # Delete the event subscription + self.eventgrid_client.event_subscriptions.delete(scope, eventsubscription_name).wait() + + # Delete the domain + self.eventgrid_client.domains.delete(resource_group.name, domain_name).wait() + + #------------------------------------------------------------------------------ if __name__ == '__main__': unittest.main()