diff --git a/azure-eventgrid/HISTORY.rst b/azure-eventgrid/HISTORY.rst index 36513a5ab0ad..5b774d604112 100644 --- a/azure-eventgrid/HISTORY.rst +++ b/azure-eventgrid/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.1.0 (2018-05-24) +++++++++++++++++++ + +- Event Schemas for EventGrid subscription validation event, Azure Media events, and ServiceBus events. + 1.0.0 (2018-04-26) ++++++++++++++++++ diff --git a/azure-eventgrid/azure/eventgrid/models/__init__.py b/azure-eventgrid/azure/eventgrid/models/__init__.py index ddea8d9d1677..57ba4b413989 100644 --- a/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -20,6 +20,9 @@ from .resource_delete_failure_data_py3 import ResourceDeleteFailureData from .resource_delete_cancel_data_py3 import ResourceDeleteCancelData from .event_grid_event_py3 import EventGridEvent + from .subscription_validation_event_data_py3 import SubscriptionValidationEventData + from .subscription_validation_response_py3 import SubscriptionValidationResponse + from .subscription_deleted_event_data_py3 import SubscriptionDeletedEventData from .iot_hub_device_created_event_data_py3 import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data_py3 import IotHubDeviceDeletedEventData from .device_twin_metadata_py3 import DeviceTwinMetadata @@ -35,6 +38,9 @@ from .container_registry_event_actor_py3 import ContainerRegistryEventActor from .container_registry_event_source_py3 import ContainerRegistryEventSource from .container_registry_event_data_py3 import ContainerRegistryEventData + from .service_bus_active_messages_available_with_no_listeners_event_data_py3 import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from .service_bus_deadletter_messages_available_with_no_listeners_event_data_py3 import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData except (SyntaxError, ImportError): from .storage_blob_created_event_data import StorageBlobCreatedEventData from .storage_blob_deleted_event_data import StorageBlobDeletedEventData @@ -46,6 +52,9 @@ from .resource_delete_failure_data import ResourceDeleteFailureData from .resource_delete_cancel_data import ResourceDeleteCancelData from .event_grid_event import EventGridEvent + from .subscription_validation_event_data import SubscriptionValidationEventData + from .subscription_validation_response import SubscriptionValidationResponse + from .subscription_deleted_event_data import SubscriptionDeletedEventData from .iot_hub_device_created_event_data import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data import IotHubDeviceDeletedEventData from .device_twin_metadata import DeviceTwinMetadata @@ -61,6 +70,12 @@ from .container_registry_event_actor import ContainerRegistryEventActor from .container_registry_event_source import ContainerRegistryEventSource from .container_registry_event_data import ContainerRegistryEventData + from .service_bus_active_messages_available_with_no_listeners_event_data import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from .service_bus_deadletter_messages_available_with_no_listeners_event_data import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from .media_job_state_change_event_data import MediaJobStateChangeEventData +from .event_grid_client_enums import ( + JobState, +) __all__ = [ 'StorageBlobCreatedEventData', @@ -73,6 +88,9 @@ 'ResourceDeleteFailureData', 'ResourceDeleteCancelData', 'EventGridEvent', + 'SubscriptionValidationEventData', + 'SubscriptionValidationResponse', + 'SubscriptionDeletedEventData', 'IotHubDeviceCreatedEventData', 'IotHubDeviceDeletedEventData', 'DeviceTwinMetadata', @@ -88,4 +106,8 @@ 'ContainerRegistryEventActor', 'ContainerRegistryEventSource', 'ContainerRegistryEventData', + 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', + 'MediaJobStateChangeEventData', + 'JobState', ] diff --git a/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py index dc8924583b50..7365ea5c6a98 100644 --- a/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_registry_event_data import ContainerRegistryEventData +from .container_registry_event_data_py3 import ContainerRegistryEventData class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): diff --git a/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py index 0eb8a68e9462..f12aa21fc809 100644 --- a/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_registry_event_data import ContainerRegistryEventData +from .container_registry_event_data_py3 import ContainerRegistryEventData class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): diff --git a/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py b/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py new file mode 100644 index 000000000000..f76069221076 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py @@ -0,0 +1,23 @@ +# 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 enum import Enum + + +class JobState(str, Enum): + + canceled = "Canceled" #: The job was canceled. This is a final state for the job. + canceling = "Canceling" #: The job is in the process of being canceled. This is a transient state for the job. + error = "Error" #: The job has encountered an error. This is a final state for the job. + finished = "Finished" #: The job is finished. This is a final state for the job. + processing = "Processing" #: The job is processing. This is a transient state for the job. + queued = "Queued" #: The job is in a queued state, waiting for resources to become available. This is a transient state. + scheduled = "Scheduled" #: The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py index 8ddc99f32782..8c739a8e7724 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties +from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py index 7d4745272f77..070953804e30 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties +from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): diff --git a/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py new file mode 100644 index 000000000000..02f704f2ca2b --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py @@ -0,0 +1,45 @@ +# 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 MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.JobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.JobState + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'JobState'}, + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, **kwargs): + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None diff --git a/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py new file mode 100644 index 000000000000..ce69d00211eb --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py @@ -0,0 +1,45 @@ +# 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 MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.JobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.JobState + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'JobState'}, + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py new file mode 100644 index 000000000000..c409c8396a05 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py @@ -0,0 +1,55 @@ +# 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 ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py new file mode 100644 index 000000000000..35a4108ae4d9 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py @@ -0,0 +1,55 @@ +# 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 ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py new file mode 100644 index 000000000000..60310de45628 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py @@ -0,0 +1,55 @@ +# 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 ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py new file mode 100644 index 000000000000..3f8afafc482c --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py @@ -0,0 +1,55 @@ +# 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 ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py new file mode 100644 index 000000000000..2aa366646706 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py @@ -0,0 +1,37 @@ +# 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 SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py new file mode 100644 index 000000000000..133338d9d112 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py @@ -0,0 +1,37 @@ +# 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 SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py new file mode 100644 index 000000000000..f9d0bfe7c431 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py @@ -0,0 +1,50 @@ +# 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 SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py new file mode 100644 index 000000000000..b4302b98927b --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py @@ -0,0 +1,50 @@ +# 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 SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py new file mode 100644 index 000000000000..034d55d1faf1 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.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 SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = kwargs.get('validation_response', None) diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py new file mode 100644 index 000000000000..dc76e2a5ca6f --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_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 SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, *, validation_response: str=None, **kwargs) -> None: + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = validation_response diff --git a/azure-eventgrid/azure/eventgrid/version.py b/azure-eventgrid/azure/eventgrid/version.py index a39916c162ce..24b9de3384da 100644 --- a/azure-eventgrid/azure/eventgrid/version.py +++ b/azure-eventgrid/azure/eventgrid/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0"