-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR eventgrid/data-plane] DeviceTelemetry event grid update (#4809)
* Generated from eef491343f2518c253fbb8c201974723020f7f2f DeviceTelemetry event grid update * Packaging update of azure-eventgrid * Generated from a12469e84f08a9055a3c03c8afc1f66bca9c1371 Create dictionary structure for properties
- Loading branch information
1 parent
6df72d0
commit 362575f
Showing
7 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
39 changes: 39 additions & 0 deletions
39
azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
35 changes: 35 additions & 0 deletions
35
azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
35 changes: 35 additions & 0 deletions
35
azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]', | ||
|