Class DeviceConnectionStateEventProperties
java.lang.Object
com.azure.messaging.eventgrid.systemevents.DeviceConnectionStateEventProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DeviceConnectionStateEventProperties>
- Direct Known Subclasses:
IotHubDeviceConnectedEventData,IotHubDeviceDisconnectedEventData
public class DeviceConnectionStateEventProperties
extends Object
implements com.azure.json.JsonSerializable<DeviceConnectionStateEventProperties>
Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected,
DeviceDisconnected).
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeviceConnectionStateEventProperties(String deviceId, String hubName, DeviceConnectionStateEventInfo deviceConnectionStateEventInfo) Creates an instance of DeviceConnectionStateEventProperties class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DeviceConnectionStateEventProperties from the JsonReader.Get the deviceConnectionStateEventInfo property: Information about the device connection state event.Get the deviceId property: The unique identifier of the device.Get the hubName property: Name of the IoT Hub where the device was created or deleted.Get the moduleId property: The unique identifier of the module.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
-
DeviceConnectionStateEventProperties
protected DeviceConnectionStateEventProperties(String deviceId, String hubName, DeviceConnectionStateEventInfo deviceConnectionStateEventInfo) Creates an instance of DeviceConnectionStateEventProperties class.- Parameters:
deviceId- the deviceId value to set.hubName- the hubName value to set.deviceConnectionStateEventInfo- the deviceConnectionStateEventInfo value to set.
-
-
Method Details
-
getDeviceId
Get the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = `@` ; $ '.- Returns:
- the deviceId value.
-
getModuleId
Get the moduleId property: The unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = `@` ; $ '.- Returns:
- the moduleId value.
-
getHubName
Get the hubName property: Name of the IoT Hub where the device was created or deleted.- Returns:
- the hubName value.
-
getDeviceConnectionStateEventInfo
Get the deviceConnectionStateEventInfo property: Information about the device connection state event.- Returns:
- the deviceConnectionStateEventInfo value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DeviceConnectionStateEventProperties>- Throws:
IOException
-
fromJson
public static DeviceConnectionStateEventProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DeviceConnectionStateEventProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DeviceConnectionStateEventProperties 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 DeviceConnectionStateEventProperties.
-