Skip to content

Commit

Permalink
Generated from a7ae120aeccf96b91aeeb0a9cba5428cd39f5352 (#2571)
Browse files Browse the repository at this point in the history
Added subscription validation response.
  • Loading branch information
AutorestCI authored May 16, 2018
1 parent 8a491dc commit 2a24a5c
Show file tree
Hide file tree
Showing 11 changed files with 251 additions and 4 deletions.
9 changes: 9 additions & 0 deletions azure-eventgrid/azure/eventgrid/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -77,6 +83,9 @@
'ResourceDeleteFailureData',
'ResourceDeleteCancelData',
'EventGridEvent',
'SubscriptionValidationEventData',
'SubscriptionValidationResponse',
'SubscriptionDeletedEventData',
'IotHubDeviceCreatedEventData',
'IotHubDeviceDeletedEventData',
'DeviceTwinMetadata',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .container_registry_event_data import ContainerRegistryEventData
from .container_registry_event_data_py3 import ContainerRegistryEventData


class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .container_registry_event_data import ContainerRegistryEventData
from .container_registry_event_data_py3 import ContainerRegistryEventData


class ContainerRegistryImagePushedEventData(ContainerRegistryEventData):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2a24a5c

Please sign in to comment.