Class DeviceTelemetryEventProperties
java.lang.Object
com.azure.messaging.eventgrid.systemevents.DeviceTelemetryEventProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DeviceTelemetryEventProperties>
- Direct Known Subclasses:
IotHubDeviceTelemetryEventData
public class DeviceTelemetryEventProperties
extends Object
implements com.azure.json.JsonSerializable<DeviceTelemetryEventProperties>
Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DeviceTelemetryEventProperties from the JsonReader.getBody()Get the body property: The content of the message from the device.Get the properties property: Application properties are user-defined strings that can be added to the message.Get the systemProperties property: System properties help identify contents and source of the messages.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DeviceTelemetryEventProperties
protected DeviceTelemetryEventProperties(Map<String, com.azure.core.util.BinaryData> body, Map<String, String> properties, Map<String, String> systemProperties) Creates an instance of DeviceTelemetryEventProperties class.- Parameters:
body- the body value to set.properties- the properties value to set.systemProperties- the systemProperties value to set.
-
-
Method Details
-
getBody
Get the body property: The content of the message from the device.- Returns:
- the body value.
-
getProperties
Get the properties property: Application properties are user-defined strings that can be added to the message. These fields are optional.- Returns:
- the properties value.
-
getSystemProperties
Get the systemProperties property: System properties help identify contents and source of the messages.- Returns:
- the systemProperties value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DeviceTelemetryEventProperties>- Throws:
IOException
-
fromJson
public static DeviceTelemetryEventProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DeviceTelemetryEventProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DeviceTelemetryEventProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the DeviceTelemetryEventProperties.
-