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] DeviceTelemetry event grid update #4809

Merged
merged 3 commits into from
Apr 9, 2019
Merged
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
3 changes: 3 additions & 0 deletions azure-eventgrid/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-eventgrid%2FREADME.png
6 changes: 6 additions & 0 deletions azure-eventgrid/azure/eventgrid/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from .iot_hub_device_deleted_event_data_py3 import IotHubDeviceDeletedEventData
from .iot_hub_device_connected_event_data_py3 import IotHubDeviceConnectedEventData
from .iot_hub_device_disconnected_event_data_py3 import IotHubDeviceDisconnectedEventData
from .iot_hub_device_telemetry_event_data_py3 import IotHubDeviceTelemetryEventData
from .device_twin_metadata_py3 import DeviceTwinMetadata
from .device_twin_properties_py3 import DeviceTwinProperties
from .device_twin_info_properties_py3 import DeviceTwinInfoProperties
Expand All @@ -38,6 +39,7 @@
from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties
from .device_connection_state_event_info_py3 import DeviceConnectionStateEventInfo
from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties
from .device_telemetry_event_properties_py3 import DeviceTelemetryEventProperties
from .container_registry_image_pushed_event_data_py3 import ContainerRegistryImagePushedEventData
from .container_registry_image_deleted_event_data_py3 import ContainerRegistryImageDeletedEventData
from .container_registry_chart_pushed_event_data_py3 import ContainerRegistryChartPushedEventData
Expand Down Expand Up @@ -107,6 +109,7 @@
from .iot_hub_device_deleted_event_data import IotHubDeviceDeletedEventData
from .iot_hub_device_connected_event_data import IotHubDeviceConnectedEventData
from .iot_hub_device_disconnected_event_data import IotHubDeviceDisconnectedEventData
from .iot_hub_device_telemetry_event_data import IotHubDeviceTelemetryEventData
from .device_twin_metadata import DeviceTwinMetadata
from .device_twin_properties import DeviceTwinProperties
from .device_twin_info_properties import DeviceTwinInfoProperties
Expand All @@ -115,6 +118,7 @@
from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties
from .device_connection_state_event_info import DeviceConnectionStateEventInfo
from .device_connection_state_event_properties import DeviceConnectionStateEventProperties
from .device_telemetry_event_properties import DeviceTelemetryEventProperties
from .container_registry_image_pushed_event_data import ContainerRegistryImagePushedEventData
from .container_registry_image_deleted_event_data import ContainerRegistryImageDeletedEventData
from .container_registry_chart_pushed_event_data import ContainerRegistryChartPushedEventData
Expand Down Expand Up @@ -191,6 +195,7 @@
'IotHubDeviceDeletedEventData',
'IotHubDeviceConnectedEventData',
'IotHubDeviceDisconnectedEventData',
'IotHubDeviceTelemetryEventData',
'DeviceTwinMetadata',
'DeviceTwinProperties',
'DeviceTwinInfoProperties',
Expand All @@ -199,6 +204,7 @@
'DeviceLifeCycleEventProperties',
'DeviceConnectionStateEventInfo',
'DeviceConnectionStateEventProperties',
'DeviceTelemetryEventProperties',
'ContainerRegistryImagePushedEventData',
'ContainerRegistryImageDeletedEventData',
'ContainerRegistryChartPushedEventData',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 DeviceTelemetryEventProperties(Model):
"""Schema of the Data property of an EventGridEvent for a device telemetry
event (DeviceTelemetry).

:param body: The content of the message from the device.
:type body: object
:param properties: Application properties are user-defined strings that
can be added to the message. These fields are optional.
:type properties: dict[str, str]
:param system_properties: System properties help identify contents and
source of the messages.
:type system_properties: dict[str, str]
"""

_attribute_map = {
'body': {'key': 'body', 'type': 'object'},
'properties': {'key': 'properties', 'type': '{str}'},
'system_properties': {'key': 'systemProperties', 'type': '{str}'},
}

def __init__(self, **kwargs):
super(DeviceTelemetryEventProperties, self).__init__(**kwargs)
self.body = kwargs.get('body', None)
self.properties = kwargs.get('properties', None)
self.system_properties = kwargs.get('system_properties', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 DeviceTelemetryEventProperties(Model):
"""Schema of the Data property of an EventGridEvent for a device telemetry
event (DeviceTelemetry).

:param body: The content of the message from the device.
:type body: object
:param properties: Application properties are user-defined strings that
can be added to the message. These fields are optional.
:type properties: dict[str, str]
:param system_properties: System properties help identify contents and
source of the messages.
:type system_properties: dict[str, str]
"""

_attribute_map = {
'body': {'key': 'body', 'type': 'object'},
'properties': {'key': 'properties', 'type': '{str}'},
'system_properties': {'key': 'systemProperties', 'type': '{str}'},
}

def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None:
super(DeviceTelemetryEventProperties, self).__init__(**kwargs)
self.body = body
self.properties = properties
self.system_properties = system_properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 .device_telemetry_event_properties import DeviceTelemetryEventProperties


class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties):
"""Event data for Microsoft.Devices.DeviceTelemetry event.

:param body: The content of the message from the device.
:type body: object
:param properties: Application properties are user-defined strings that
can be added to the message. These fields are optional.
:type properties: dict[str, str]
:param system_properties: System properties help identify contents and
source of the messages.
:type system_properties: dict[str, str]
"""

_attribute_map = {
'body': {'key': 'body', 'type': 'object'},
'properties': {'key': 'properties', 'type': '{str}'},
'system_properties': {'key': 'systemProperties', 'type': '{str}'},
}

def __init__(self, **kwargs):
super(IotHubDeviceTelemetryEventData, self).__init__(**kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 .device_telemetry_event_properties_py3 import DeviceTelemetryEventProperties


class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties):
"""Event data for Microsoft.Devices.DeviceTelemetry event.

:param body: The content of the message from the device.
:type body: object
:param properties: Application properties are user-defined strings that
can be added to the message. These fields are optional.
:type properties: dict[str, str]
:param system_properties: System properties help identify contents and
source of the messages.
:type system_properties: dict[str, str]
"""

_attribute_map = {
'body': {'key': 'body', 'type': 'object'},
'properties': {'key': 'properties', 'type': '{str}'},
'system_properties': {'key': 'systemProperties', 'type': '{str}'},
}

def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None:
super(IotHubDeviceTelemetryEventData, self).__init__(body=body, properties=properties, system_properties=system_properties, **kwargs)
1 change: 1 addition & 0 deletions azure-eventgrid/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
version=version,
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
long_description=readme + '\n\n' + history,
long_description_content_type='text/x-rst',
license='MIT License',
author='Microsoft Corporation',
author_email='[email protected]',
Expand Down