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 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

      public Map<String,com.azure.core.util.BinaryData> getBody()
      Get the body property: The content of the message from the device.
      Returns:
      the body value.
    • getProperties

      public Map<String,String> 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

      public Map<String,String> getSystemProperties()
      Get the systemProperties property: System properties help identify contents and source of the messages.
      Returns:
      the systemProperties value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.