diff --git a/azure-eventgrid/azure/eventgrid/models/__init__.py b/azure-eventgrid/azure/eventgrid/models/__init__.py index 88e6490d4025..2b2f97b8fbfa 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 @@ -48,6 +51,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 @@ -77,6 +83,9 @@ 'ResourceDeleteFailureData', 'ResourceDeleteCancelData', 'EventGridEvent', + 'SubscriptionValidationEventData', + 'SubscriptionValidationResponse', + 'SubscriptionDeletedEventData', 'IotHubDeviceCreatedEventData', 'IotHubDeviceDeletedEventData', 'DeviceTwinMetadata', 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/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/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