Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] eventgrid/data-plane #2546

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 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 All @@ -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
Expand All @@ -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
Expand All @@ -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',
Expand All @@ -73,6 +88,9 @@
'ResourceDeleteFailureData',
'ResourceDeleteCancelData',
'EventGridEvent',
'SubscriptionValidationEventData',
'SubscriptionValidationResponse',
'SubscriptionDeletedEventData',
'IotHubDeviceCreatedEventData',
'IotHubDeviceDeletedEventData',
'DeviceTwinMetadata',
Expand All @@ -88,4 +106,8 @@
'ContainerRegistryEventActor',
'ContainerRegistryEventSource',
'ContainerRegistryEventData',
'ServiceBusActiveMessagesAvailableWithNoListenersEventData',
'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData',
'MediaJobStateChangeEventData',
'JobState',
]
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
23 changes: 23 additions & 0 deletions azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py
Original file line number Diff line number Diff line change
@@ -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.
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,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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)
Loading