From 51c52dbbc2b2515429dadd884bdeee8335e06185 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 8 Apr 2019 23:07:29 +0000 Subject: [PATCH 1/3] Generated from eef491343f2518c253fbb8c201974723020f7f2f DeviceTelemetry event grid update --- .../azure/eventgrid/models/__init__.py | 6 +++ .../device_telemetry_event_properties.py | 39 +++++++++++++++++++ .../device_telemetry_event_properties_py3.py | 39 +++++++++++++++++++ .../iot_hub_device_telemetry_event_data.py | 35 +++++++++++++++++ ...iot_hub_device_telemetry_event_data_py3.py | 35 +++++++++++++++++ 5 files changed, 154 insertions(+) create mode 100644 azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py create mode 100644 azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py create mode 100644 azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py create mode 100644 azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py diff --git a/azure-eventgrid/azure/eventgrid/models/__init__.py b/azure-eventgrid/azure/eventgrid/models/__init__.py index 60f75159e94b..355df072cd54 100644 --- a/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -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 @@ -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 @@ -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 @@ -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 @@ -191,6 +195,7 @@ 'IotHubDeviceDeletedEventData', 'IotHubDeviceConnectedEventData', 'IotHubDeviceDisconnectedEventData', + 'IotHubDeviceTelemetryEventData', 'DeviceTwinMetadata', 'DeviceTwinProperties', 'DeviceTwinInfoProperties', @@ -199,6 +204,7 @@ 'DeviceLifeCycleEventProperties', 'DeviceConnectionStateEventInfo', 'DeviceConnectionStateEventProperties', + 'DeviceTelemetryEventProperties', 'ContainerRegistryImagePushedEventData', 'ContainerRegistryImageDeletedEventData', 'ContainerRegistryChartPushedEventData', diff --git a/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py new file mode 100644 index 000000000000..80dfc02cba90 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py @@ -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: object + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: object + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'system_properties': {'key': 'systemProperties', 'type': 'object'}, + } + + 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) diff --git a/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py new file mode 100644 index 000000000000..8d2324b6f112 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py @@ -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: object + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: object + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'system_properties': {'key': 'systemProperties', 'type': 'object'}, + } + + 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 diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py new file mode 100644 index 000000000000..9476839a487a --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py @@ -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: object + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: object + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'system_properties': {'key': 'systemProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceTelemetryEventData, self).__init__(**kwargs) diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py new file mode 100644 index 000000000000..c8dac5e86b9a --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py @@ -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: object + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: object + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'system_properties': {'key': 'systemProperties', 'type': 'object'}, + } + + 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) From 3c65a58458d69f40f026686290a8232f86ff5fb8 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Mon, 8 Apr 2019 23:11:05 +0000 Subject: [PATCH 2/3] Packaging update of azure-eventgrid --- azure-eventgrid/README.rst | 3 +++ azure-eventgrid/setup.py | 1 + 2 files changed, 4 insertions(+) diff --git a/azure-eventgrid/README.rst b/azure-eventgrid/README.rst index dd5266c639ec..917e45cba5e9 100644 --- a/azure-eventgrid/README.rst +++ b/azure-eventgrid/README.rst @@ -22,3 +22,6 @@ Provide Feedback If you encounter any bugs or have suggestions, please file an issue in the `Issues `__ section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-eventgrid%2FREADME.png diff --git a/azure-eventgrid/setup.py b/azure-eventgrid/setup.py index 35c7d8087e6a..f43c64560ac5 100644 --- a/azure-eventgrid/setup.py +++ b/azure-eventgrid/setup.py @@ -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='azpysdkhelp@microsoft.com', From 04ff48771a439696b42b6dd91692de79118dc35c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 9 Apr 2019 19:53:43 +0000 Subject: [PATCH 3/3] Generated from a12469e84f08a9055a3c03c8afc1f66bca9c1371 Create dictionary structure for properties --- .../eventgrid/models/device_telemetry_event_properties.py | 8 ++++---- .../models/device_telemetry_event_properties_py3.py | 8 ++++---- .../models/iot_hub_device_telemetry_event_data.py | 8 ++++---- .../models/iot_hub_device_telemetry_event_data_py3.py | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py index 80dfc02cba90..5ef54c29c86d 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py +++ b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py @@ -20,16 +20,16 @@ class DeviceTelemetryEventProperties(Model): :type body: object :param properties: Application properties are user-defined strings that can be added to the message. These fields are optional. - :type properties: object + :type properties: dict[str, str] :param system_properties: System properties help identify contents and source of the messages. - :type system_properties: object + :type system_properties: dict[str, str] """ _attribute_map = { 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'system_properties': {'key': 'systemProperties', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, } def __init__(self, **kwargs): diff --git a/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py index 8d2324b6f112..57fdb9114dc5 100644 --- a/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py @@ -20,16 +20,16 @@ class DeviceTelemetryEventProperties(Model): :type body: object :param properties: Application properties are user-defined strings that can be added to the message. These fields are optional. - :type properties: object + :type properties: dict[str, str] :param system_properties: System properties help identify contents and source of the messages. - :type system_properties: object + :type system_properties: dict[str, str] """ _attribute_map = { 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'system_properties': {'key': 'systemProperties', '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: diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py index 9476839a487a..68327f110245 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py @@ -19,16 +19,16 @@ class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): :type body: object :param properties: Application properties are user-defined strings that can be added to the message. These fields are optional. - :type properties: object + :type properties: dict[str, str] :param system_properties: System properties help identify contents and source of the messages. - :type system_properties: object + :type system_properties: dict[str, str] """ _attribute_map = { 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'system_properties': {'key': 'systemProperties', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, } def __init__(self, **kwargs): diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py index c8dac5e86b9a..99ff68ce2594 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py @@ -19,16 +19,16 @@ class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): :type body: object :param properties: Application properties are user-defined strings that can be added to the message. These fields are optional. - :type properties: object + :type properties: dict[str, str] :param system_properties: System properties help identify contents and source of the messages. - :type system_properties: object + :type system_properties: dict[str, str] """ _attribute_map = { 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'system_properties': {'key': 'systemProperties', '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: